Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2005


Ignore:
Timestamp:
Oct 24, 2008, 1:08:58 AM (15 years ago)
Author:
rgrieder
Message:

Minor changes in CommandLine.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/objecthierarchy/src/core/CommandLine.h

    r2003 r2005  
    4747namespace orxonox
    4848{
    49     /**
    50     @brief
    51         Template struct which creates a distinct type for every integer constant.
    52     @note
    53         This allows to select a different function depending on a boolean value
    54         when creating a new CommandLineArgument.
    55         From 'Modern C++ Design' (Alexandrescu 2001).
    56     */
    57     template <int v>
    58     struct Int2Type
    59     {
    60         enum { value = v };
    61     };
    62 
    6349    /**
    6450    @brief
     
    209195    CommandLineArgument& CommandLine::addArgument(const std::string& name, T defaultValue)
    210196    {
    211         std::map<std::string, CommandLineArgument*>::const_iterator it = _getInstance().cmdLineArgs_.find(name);
    212         OrxAssert(it == _getInstance().cmdLineArgs_.end(),
     197        OrxAssert(!_getInstance().existsArgument(name),
    213198            "Cannot add a command line argument with name '" + name + "' twice.");
    214199
Note: See TracChangeset for help on using the changeset viewer.