Show
Ignore:
Timestamp:
03/21/12 18:36:20 (2 years ago)
Author:
robert
Message:

Ran script to remove trailing spaces and tabs

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osgDB/SharedStateManager.cpp

    r12006 r13041  
    1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield  
     1/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield 
    22 * 
    3  * This library is open source and may be redistributed and/or modified under   
    4  * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or  
     3 * This library is open source and may be redistributed and/or modified under 
     4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or 
    55 * (at your option) any later version.  The full license is in LICENSE file 
    66 * included with this distribution, and on the openscenegraph.org website. 
    7  *  
     7 * 
    88 * This library is distributed in the hope that it will be useful, 
    99 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
    10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the  
     10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    1111 * OpenSceneGraph Public License for more details. 
    1212*/ 
     
    1818 
    1919SharedStateManager::SharedStateManager(unsigned int mode): 
    20     osg::NodeVisitor(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN)  
     20    osg::NodeVisitor(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN) 
    2121{ 
    2222    setShareMode(mode); 
     
    6161    } 
    6262 
    63 }  
     63} 
    6464 
    6565 
     
    7171//    const osg::Timer& timer = *osg::Timer::instance(); 
    7272//    osg::Timer_t start_tick = timer.tick(); 
    73      
     73 
    7474    _mutex = mt; 
    7575    node->accept(*this); 
     
    108108    } 
    109109} 
    110   
     110 
    111111bool SharedStateManager::isShared(osg::StateSet* ss) 
    112112{ 
     
    156156        return result->get(); 
    157157} 
    158     
     158 
    159159 
    160160//---------------------------------------------------------------- 
     
    195195            if(titr==tmpSharedTextureList.end()) 
    196196            { 
    197                 // Texture is not in tmp list:  
     197                // Texture is not in tmp list: 
    198198                // First time it appears in this file, search Texture in sharedAttributeList 
    199199                osg::StateAttribute *textureFromSharedList = find(texture); 
    200200                if(textureFromSharedList) 
    201201                { 
    202                     // Texture is in sharedAttributeList:  
     202                    // Texture is in sharedAttributeList: 
    203203                    // Share now. Required to be shared all next times 
    204204                    if(_mutex) _mutex->lock(); 
     
    209209                else 
    210210                { 
    211                     // Texture is not in _sharedAttributeList:  
     211                    // Texture is not in _sharedAttributeList: 
    212212                    // Add to _sharedAttributeList. Not needed to be 
    213213                    // shared all next times. 
    214214                    OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_listMutex); 
    215                     _sharedTextureList.insert(texture);  
    216                     tmpSharedTextureList[texture] = TextureSharePair(texture, false);             
     215                    _sharedTextureList.insert(texture); 
     216                    tmpSharedTextureList[texture] = TextureSharePair(texture, false); 
    217217                } 
    218218            } 
     
    241241        if (sitr==tmpSharedStateSetList.end()) 
    242242        { 
    243             // StateSet is not in tmp list:  
     243            // StateSet is not in tmp list: 
    244244            // First time it appears in this file, search StateSet in sharedObjectList 
    245245            osg::StateSet *ssFromSharedList = find(ss); 
    246246            if (ssFromSharedList) 
    247247            { 
    248                 // StateSet is in sharedStateSetList:  
     248                // StateSet is in sharedStateSetList: 
    249249                // Share now. Required to be shared all next times 
    250250                if (_mutex) _mutex->lock(); 
     
    255255            else 
    256256            { 
    257                 // StateSet is not in sharedStateSetList:  
     257                // StateSet is not in sharedStateSetList: 
    258258                // Add to sharedStateSetList. Not needed to be shared all next times. 
    259259                { 
    260260                    OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_listMutex); 
    261                     _sharedStateSetList.insert(ss);  
     261                    _sharedStateSetList.insert(ss); 
    262262                    tmpSharedStateSetList[ss] 
    263                         = StateSetSharePair(ss, false);             
     263                        = StateSetSharePair(ss, false); 
    264264                } 
    265265                // Only in this case sharing textures is also required