Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 29, 2009, 11:59:29 PM (15 years ago)
Author:
rgrieder
Message:

#298: Improved usage dialogue creation and the information itself.

File:
1 edited

Legend:

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

    r3246 r3255  
    8080
    8181        //! Returns the shortcut (example: "-p 22" for "--port 22") of the argument.
    82         //! Evaluates to "" if none there is none.
     82        //! Evaluates to "" if there is none.
    8383        const std::string& getShortcut() const { return shortcut_; }
    8484        //! Sets the shortcut for the argument
     
    213213        OrxAssert(!_getInstance().existsArgument(name),
    214214            "Cannot add a command line argument with name '" + name + "' twice.");
     215        OrxAssert(MultiType(defaultValue).getType() != MT_bool || MultiType(defaultValue).getBool() != true,
     216               "Boolean command line arguments with positive default values are not supported." << std::endl
     217            << "Please use SetCommandLineSwitch and adjust your argument: " << name);
    215218
    216219        return *(_getInstance().cmdLineArgs_[name] = new CommandLineArgument(name, defaultValue, bCommandLineOnly));
Note: See TracChangeset for help on using the changeset viewer.