Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 12, 2008, 3:56:36 PM (17 years ago)
Author:
landauf
Message:

corrected debug output in case of an invalid vector index
(remember: don't use COUT(x) inside an if/else block without using braces - it's a macro using 'if' itself)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core2/src/orxonox/core/ConfigValueContainer.cc

    r1030 r1031  
    153153            {
    154154                if (!success)
     155                {
    155156                    COUT(1) << "Error: Config-value '" << this->varname_ << "' in " << this->sectionname_ << " is a vector." << std::endl;
     157                }
    156158                else
     159                {
    157160                    COUT(1) << "Error: Invalid vector-index." << std::endl;
     161                }
    158162                return false;
    159163            }
     
    275279
    276280            if (!success || index < 0 || index > MAX_VECTOR_INDEX)
     281            {
     282                if (!success)
     283                {
     284                    COUT(1) << "Error: Config-value '" << this->varname_ << "' in " << this->sectionname_ << " is a vector." << std::endl;
     285                }
     286                else
     287                {
     288                    COUT(1) << "Error: Invalid vector-index." << std::endl;
     289                }
    277290                return false;
     291            }
    278292
    279293            if (token.size() >= 2)
Note: See TracChangeset for help on using the changeset viewer.