VirtualBox

Changeset 3007

Show
Ignore:
Timestamp:
06/04/07 10:39:52 (2 years ago)
Author:
vboxsync
Message:

Moved the template code out of cdefs.h, partly because it didn't belong there but mostly because it was at the end of the file and would screw up any attempts made by the object cache at avoid recompiling on cdefs.h changes.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/include/iprt/cdefs.h

    r2981 r3007  
    13041304    inline static void operator delete (void *); 
    13051305 
    1306  
    1307 /** 
    1308  * Shortcut to |const_cast<C &>()| that automatically derives the correct 
    1309  * type (class) for the const_cast template's argument from its own argument. 
    1310  * Can be used to temporarily cancel the |const| modifier on the left-hand side 
    1311  * of assignment expressions, like this: 
    1312  * @code 
    1313  *      const Class that; 
    1314  *      ... 
    1315  *      unconst (that) = some_value; 
    1316  * @endcode 
    1317  */ 
    1318 template <class C> 
    1319 inline C &unconst (const C &that) { return const_cast <C &> (that); } 
    1320  
    1321  
    1322 /** 
    1323  * Shortcut to |const_cast<C *>()| that automatically derives the correct 
    1324  * type (class) for the const_cast template's argument from its own argument. 
    1325  * Can be used to temporarily cancel the |const| modifier on the left-hand side 
    1326  * of assignment expressions, like this: 
    1327  * @code 
    1328  *      const Class *that; 
    1329  *      ... 
    1330  *      unconst (that) = some_value; 
    1331  * @endcode 
    1332  */ 
    1333 template <class C> 
    1334 inline C *unconst (const C *that) { return const_cast <C *> (that); } 
    1335  
    13361306#endif /* defined(__cplusplus) */ 
    13371307 
  • trunk/src/VBox/Main/BIOSSettingsImpl.cpp

    r2981 r3007  
    2323#include "MachineImpl.h" 
    2424#include "Logging.h" 
     25#include <iprt/cpputils.h> 
    2526 
    2627// constructor / destructor 
  • trunk/src/VBox/Main/ConsoleImpl.cpp

    r3001 r3007  
    6060#include <iprt/process.h> 
    6161#include <iprt/ldr.h> 
     62#include <iprt/cpputils.h> 
    6263 
    6364#include <VBox/vmapi.h> 
  • trunk/src/VBox/Main/DVDImageImpl.cpp

    r2981 r3007  
    2626#include <iprt/file.h> 
    2727#include <iprt/path.h> 
     28#include <iprt/cpputils.h> 
    2829#include <VBox/err.h> 
    2930#include <VBox/param.h> 
  • trunk/src/VBox/Main/FloppyImageImpl.cpp

    r2981 r3007  
    2626#include <iprt/file.h> 
    2727#include <iprt/path.h> 
     28#include <iprt/cpputils.h> 
    2829#include <VBox/err.h> 
    2930#include <VBox/param.h> 
  • trunk/src/VBox/Main/GuestImpl.cpp

    r2981 r3007  
    2727 
    2828#include <VBox/VBoxDev.h> 
     29#include <iprt/cpputils.h> 
    2930 
    3031// defines 
  • trunk/src/VBox/Main/GuestOSTypeImpl.cpp

    r2981 r3007  
    2222#include "GuestOSTypeImpl.h" 
    2323#include "Logging.h" 
     24#include <iprt/cpputils.h> 
    2425 
    2526// constructor / destructor 
  • trunk/src/VBox/Main/HardDiskImpl.cpp

    r2981 r3007  
    3131#include <iprt/path.h> 
    3232#include <iprt/dir.h> 
     33#include <iprt/cpputils.h> 
    3334#include <VBox/VBoxHDD.h> 
    3435#include <VBox/VBoxHDD-new.h> 
  • trunk/src/VBox/Main/HostDVDDriveImpl.cpp

    r2981 r3007  
    2121 
    2222#include "HostDVDDriveImpl.h" 
     23#include <iprt/cpputils.h> 
    2324 
    2425// constructor / destructor 
  • trunk/src/VBox/Main/HostFloppyDriveImpl.cpp

    r2981 r3007  
    2121 
    2222#include "HostFloppyDriveImpl.h" 
     23#include <iprt/cpputils.h> 
    2324 
    2425// constructor / destructor 
  • trunk/src/VBox/Main/HostUSBDeviceImpl.cpp

    r3001 r3007  
    2828 
    2929#include <VBox/err.h> 
     30#include <iprt/cpputils.h> 
    3031 
    3132// constructor / destructor 
     
    314315//////////////////////////////////////////////////////////////////////////////// 
    315316 
    316 /**  
     317/** 
    317318 * @note Locks this object for reading. 
    318319 */ 
     
    447448/** 
    448449 *  Requests the USB proxy service to release the device, sets the pending 
    449  *  state to Held and removes the machine association if any.  
     450 *  state to Held and removes the machine association if any. 
    450451 * 
    451452 *  If the state change may be performed immediately (for example, the current 
     
    578579 
    579580                Assert (!mMachine.isNull()); 
    580                  
     581 
    581582                /// @todo more detailed error message depending on the state? 
    582583                //  probably need some error code/string from the USB proxy itself 
    583                  
     584 
    584585                requestRC = E_FAIL; 
    585586                errorText = Utf8StrFmt ( 
     
    605606                /// @todo more detailed error message depending on the state? 
    606607                //  probably need some error code/string from the USB proxy itself 
    607                  
     608 
    608609                requestRC = E_FAIL; 
    609610                errorText = Utf8StrFmt ( 
  • trunk/src/VBox/Main/MachineImpl.cpp

    r3001 r3007  
    5858#include <iprt/asm.h> 
    5959#include <iprt/process.h> 
     60#include <iprt/cpputils.h> 
    6061#include <VBox/param.h> 
    6162 
  • trunk/src/VBox/Main/SharedFolderImpl.cpp

    r2981 r3007  
    2929#include <iprt/param.h> 
    3030#include <iprt/path.h> 
     31#include <iprt/cpputils.h> 
    3132 
    3233// constructor / destructor 
     
    139140    Utf8Str hostPath = Utf8Str (aHostPath); 
    140141    size_t hostPathLen = hostPath.length(); 
    141      
     142 
    142143    /* Remove the trailng slash unless it's a root directory 
    143144     * (otherwise the comparison with the RTPathAbs() result will fail at least 
     
    157158    else 
    158159        RTPathStripTrailingSlash (hostPath.mutableRaw()); 
    159      
     160 
    160161    /* Check whether the path is full (absolute) */ 
    161162    char hostPathFull [RTPATH_MAX]; 
  • trunk/src/VBox/Main/USBControllerImpl.cpp

    r3001 r3007  
    3333 
    3434#include <iprt/string.h> 
     35#include <iprt/cpputils.h> 
    3536#include <VBox/err.h> 
    3637 
     
    11901191    } 
    11911192 
    1192     return S_OK;  
     1193    return S_OK; 
    11931194} 
    11941195 
  • trunk/src/VBox/Main/VirtualBoxImpl.cpp

    r2980 r3007  
    4848#include <iprt/thread.h> 
    4949#include <iprt/process.h> 
     50#include <iprt/cpputils.h> 
    5051 
    5152#include <VBox/err.h> 

© 2008 Sun Microsystems, Inc.
ContactPrivacy policy