Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 22, 2009, 2:07:44 PM (14 years ago)
Author:
rgrieder
Message:

std::string tweaks:

  • Declared BLANKSTRING in UtilPrereqs.h as well (removed obsolete StringUtils.h includes to avoid dependencies)
  • Using BLANKSTRING if const std::string& return type is possible
  • Replaced a few (const) std::string arguments with const std::string&
  • if (str == "") —> if (str.empty())
  • std::string msg = name + "adsf"; —> const std::string& msg = name + "asdf";
  • std::string asdf = object→getFooBar(); —> const std::string& asdf = object→getFooBar();
  • std::string asdf = "asdf"; —> std::string asdf("asdf");
  • ostream << "."; and name + "." —> ostream << '.'; and name + '.'
  • str = ""; —> str.clear()
  • std::string asdf = ""; —> std::string asdf;
  • asdf_ = ""; (in c'tor) —> delete line
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation2/src/libraries/util/MathConvert.h

    r5738 r6394  
    5353        {
    5454            std::ostringstream ostream;
    55             if (ostream << input.x << "," << input.y)
     55            if (ostream << input.x << ',' << input.y)
    5656            {
    5757                (*output) = ostream.str();
     
    6969        {
    7070            std::ostringstream ostream;
    71             if (ostream << input.x << "," << input.y << "," << input.z)
     71            if (ostream << input.x << ',' << input.y << ',' << input.z)
    7272            {
    7373                (*output) = ostream.str();
     
    8585        {
    8686            std::ostringstream ostream;
    87             if (ostream << input.x << "," << input.y << "," << input.z << "," << input.w)
     87            if (ostream << input.x << ',' << input.y << ',' << input.z << ',' << input.w)
    8888            {
    8989                (*output) = ostream.str();
     
    101101        {
    102102            std::ostringstream ostream;
    103             if (ostream << input.w << "," << input.x << "," << input.y << "," << input.z)
     103            if (ostream << input.w << ',' << input.x << ',' << input.y << ',' << input.z)
    104104            {
    105105                (*output) = ostream.str();
     
    117117        {
    118118            std::ostringstream ostream;
    119             if (ostream << input.r << "," << input.g << "," << input.b << "," << input.a)
     119            if (ostream << input.r << ',' << input.g << ',' << input.b << ',' << input.a)
    120120            {
    121121                (*output) = ostream.str();
Note: See TracChangeset for help on using the changeset viewer.