Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 14, 2008, 9:39:57 PM (16 years ago)
Author:
rgrieder
Message:
  • replaced all String2Number with ConvertValue
  • replaced all tokenize with SubString
  • dealt with warnings under msvc
  • removed some warnings by placing casts
  • bugfix in audio: local variable pushed into member variable std::vector
  • updated StableHeaders.h
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/objects/Ambient.cc

    r1056 r1064  
    3636
    3737#include "util/tinyxml/tinyxml.h"
    38 #include "util/Tokenizer.h"
    39 #include "util/String2Number.h"
     38#include "util/SubString.h"
     39#include "util/Convert.h"
    4040#include "util/Math.h"
    4141#include "core/Debug.h"
     
    6767        if (xmlElem->Attribute("colourvalue"))
    6868        {
     69        SubString colourvalues(xmlElem->Attribute("colourvalue"), ',');
    6970
    70                 std::vector<std::string> colourvalues = tokenize(xmlElem->Attribute("colourvalue"),",");
    7171                float r, g, b;
    72                 String2Number<float>(r, colourvalues[0]);
    73                 String2Number<float>(g, colourvalues[1]);
    74                 String2Number<float>(b, colourvalues[2]);
     72        convertValue<std::string, float>(&r, colourvalues[0]);
     73        convertValue<std::string, float>(&g, colourvalues[1]);
     74        convertValue<std::string, float>(&b, colourvalues[2]);
    7575
    7676                this->setAmbientLight(ColourValue(r, g, b));
Note: See TracChangeset for help on using the changeset viewer.