Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 17, 2007, 3:20:46 AM (17 years ago)
Author:
landauf
Message:
  • changed output from std::cout to COUT(level)
  • added SoftDebugLevel config-variable (its a hack, but it works fine)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/FICN/src/misc/String2Number.h

    r507 r560  
    55#include <sstream>
    66#include <iostream>
     7
     8#include "../orxonox/core/Debug.h"
    79
    810/**
     
    1618*
    1719* @example
    18 * float f; 
     20* float f;
    1921* String2Number<float>(f, std::string(" 123.45 "));
    2022*/
     
    2931        *
    3032        * First value is the target variable, the second vector is the
    31         * string where the number is taken from, the third parameter 
     33        * string where the number is taken from, the third parameter
    3234        * should be one of std::hex, std::dec or std::oct (dec is default value)
    3335        */
     
    3638          std::istringstream iss(s);
    3739          success_ = !(iss >> f >> t).fail();
    38          
     40
    3941          if (!success_ && haltOnError==1)
    4042          {
    41                 std::cout << "Conversion error from string to number in \"" << s << "\"" << std::endl;
     43                COUT(1) << "Error: Conversion from string to number in \"" << s << "\" failed." << std::endl;
    4244                exit(1);
    4345          }
Note: See TracChangeset for help on using the changeset viewer.