Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 1879 for code


Ignore:
Timestamp:
Oct 3, 2008, 2:44:46 PM (16 years ago)
Author:
rgrieder
Message:

Removed some always-true statements that gcc issued with the -W option.
There is still a lot of warnings from the Ogre UTFString header about the copy constructor initialisation.
—> We would need to use -W -Wno-unused-parameter -Wno-?. I couldn't find that option directly unfortunately.

Location:
code/trunk/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/core/CommandEvaluation.cc

    r1747 r1879  
    220220    void CommandEvaluation::setEvaluatedParameter(unsigned int index, MultiType param)
    221221    {
    222         if (index >= 0 && index < MAX_FUNCTOR_ARGUMENTS)
     222        if (index < MAX_FUNCTOR_ARGUMENTS)
    223223            this->param_[index] = param;
    224224    }
     
    226226    MultiType CommandEvaluation::getEvaluatedParameter(unsigned int index) const
    227227    {
    228         if (index >= 0 && index < MAX_FUNCTOR_ARGUMENTS)
     228        if (index < MAX_FUNCTOR_ARGUMENTS)
    229229            return this->param_[index];
    230230
  • code/trunk/src/core/Executor.cc

    r1786 r1879  
    132132    Executor& Executor::setDescriptionParam(unsigned int param, const std::string& description)
    133133    {
    134         if (param >= 0 && param < MAX_FUNCTOR_ARGUMENTS)
     134        if (param < MAX_FUNCTOR_ARGUMENTS)
    135135        {
    136136            if (!this->bAddedDescriptionParam_[param])
     
    150150    const std::string& Executor::getDescriptionParam(unsigned int param) const
    151151    {
    152         if (param >= 0 && param < MAX_FUNCTOR_ARGUMENTS)
     152        if (param < MAX_FUNCTOR_ARGUMENTS)
    153153            return GetLocalisation(this->descriptionParam_[param]);
    154154
     
    234234    Executor& Executor::setDefaultValue(unsigned int index, const MultiType& param)
    235235    {
    236         if (index >= 0 && index < MAX_FUNCTOR_ARGUMENTS)
     236        if (index < MAX_FUNCTOR_ARGUMENTS)
    237237        {
    238238            this->defaultValue_[index] = param;
  • code/trunk/src/core/Executor.h

    r1786 r1879  
    198198            inline MultiType getDefaultValue(unsigned int index) const
    199199            {
    200                 if (index >= 0 && index < MAX_FUNCTOR_ARGUMENTS)
     200                if (index < MAX_FUNCTOR_ARGUMENTS)
    201201                    return this->defaultValue_[index];
    202202
     
    207207            inline bool defaultValueSet(unsigned int index) const
    208208            {
    209                 if (index >= 0 && index < MAX_FUNCTOR_ARGUMENTS)
     209                if (index < MAX_FUNCTOR_ARGUMENTS)
    210210                    return this->bAddedDefaultValue_[index];
    211211
  • code/trunk/src/core/Functor.h

    r1786 r1879  
    105105            inline MultiType getReturnvalue() const { return this->returnedValue_; }
    106106
    107             std::string getTypenameParam(unsigned int param) const { return (param >= 0 && param < 5) ? this->typeParam_[param] : ""; }
     107            std::string getTypenameParam(unsigned int param) const { return (param < 5) ? this->typeParam_[param] : ""; }
    108108            std::string getTypenameReturnvalue() const { return this->typeReturnvalue_; }
    109109
  • code/trunk/src/orxonox/overlays/console/InGameConsole.cc

    r1878 r1879  
    328328        if (pos > maxCharsPerLine_)
    329329            pos = maxCharsPerLine_;
    330         else if (pos < 0)
    331             pos = 0;
    332330
    333331        this->consoleOverlayCursor_->setCaption(std::string(pos,' ') + cursorSymbol_);
  • code/trunk/src/orxonox/overlays/console/InGameConsole.h

    r1878 r1879  
    6262
    6363    private: // functions
    64         InGameConsole(const InGameConsole& other) {}
     64        InGameConsole(const InGameConsole& other);
    6565
    6666        void activate();
Note: See TracChangeset for help on using the changeset viewer.