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/osg/ArgumentParser.cpp

    r11875 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*/ 
     
    5858 
    5959    const char* ptr = str; 
    60      
     60 
    6161    // check if could be a hex number. 
    6262    if (strncmp(ptr,"0x",2)==0) 
     
    6868               *ptr!=0 && 
    6969               ((*ptr>='0' && *ptr<='9') || 
    70                 (*ptr>='a' && *ptr<='f') ||   
     70                (*ptr>='a' && *ptr<='f') || 
    7171                (*ptr>='A' && *ptr<='F')) 
    7272              ) 
     
    7474            ++ptr; 
    7575        } 
    76          
     76 
    7777        // got to end of string without failure, therefore must be a hex integer. 
    7878        if (*ptr==0) return true; 
    7979    } 
    80      
     80 
    8181    ptr = str; 
    8282 
     
    137137 
    138138    return false; 
    139      
     139 
    140140} 
    141141 
     
    187187{ 
    188188#ifdef __APPLE__ 
    189     //On OSX, any -psn arguments need to be removed because they will  
     189    //On OSX, any -psn arguments need to be removed because they will 
    190190    // confuse the application. -psn plus a concatenated argument are 
    191191    // passed by the finder to application bundles 
    192192    for(int pos=1;pos<this->argc();++pos) 
    193193    { 
    194         if (std::string(_argv[pos]).compare(0, 4, std::string("-psn")) == 0)  
     194        if (std::string(_argv[pos]).compare(0, 4, std::string("-psn")) == 0) 
    195195        { 
    196196            remove(pos, 1); 
     
    216216} 
    217217 
    218   
     218 
    219219bool ArgumentParser::isOption(int pos) const 
    220220{ 
     
    264264{ 
    265265    if (num==0) return; 
    266      
     266 
    267267    for(;pos+num<*_argc;++pos) 
    268268    { 
     
    595595{ 
    596596    std::set<std::string> options; 
    597     if (_usage.valid())  
     597    if (_usage.valid()) 
    598598    { 
    599599        // parse the usage options to get all the option that the application can potential handle. 
     
    606606            while ((pos=option.find(' ',prevpos))!=std::string::npos) 
    607607            { 
    608                 if (option[prevpos]=='-')  
     608                if (option[prevpos]=='-') 
    609609                { 
    610610                    options.insert(std::string(option,prevpos,pos-prevpos)); 
     
    612612                prevpos=pos+1; 
    613613            } 
    614             if (option[prevpos]=='-')  
     614            if (option[prevpos]=='-') 
    615615            { 
    616616 
     
    618618            } 
    619619        } 
    620          
     620 
    621621    } 
    622622 
     
    624624    { 
    625625        // if an option and havn't been previous querried for report as unrecognized. 
    626         if (isOption(pos) && options.find(_argv[pos])==options.end())  
     626        if (isOption(pos) && options.find(_argv[pos])==options.end()) 
    627627        { 
    628628            reportError(std::string("unrecognized option ")+std::string(_argv[pos]),severity); 
     
    643643} 
    644644 
    645 ApplicationUsage::Type ArgumentParser::readHelpType()  
     645ApplicationUsage::Type ArgumentParser::readHelpType() 
    646646{ 
    647647    getApplicationUsage()->addCommandLineOption("-h or --help","Display command line parameters");