Changeset 437


Ignore:
Timestamp:
Dec 15, 2005, 9:32:38 AM (17 years ago)
Author:
Jari Häkkinen
Message:

Minor style fixes.

Location:
trunk/lib/utility
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/utility/stl_utility.cc

    r436 r437  
    1313namespace utility {
    1414
    15  
    1615  bool read_to_double(std::istream& is, std::vector<double>& vec)
    1716  {
     
    8281
    8382}} // end of namespace utility and namespace thep
    84 
  • trunk/lib/utility/stl_utility.h

    r436 r437  
    1818
    1919namespace std {
     20
    2021  ///
    2122  /// Print out a pair
     
    2627  std::ostream& operator<<(std::ostream& out, const std::pair<T1,T2>& p)
    2728  { out << p.first << "\t" << p.second; return out; }
     29
    2830}
    2931
     
    5052    }
    5153  };
    52 
    53  
    5454
    5555  ///
     
    102102  }
    103103
    104 
    105104  ///
    106105  /// Function converting a string to upper case
  • trunk/lib/utility/utility.cc

    r435 r437  
    1515    std::stringstream ss(s);
    1616    double a;
    17     if(ss>>a)
    18       return 1;
    19     else
    20       return 0;
     17    return (ss>>a);
    2118  }
    2219 
     
    2522    std::stringstream ss(s);
    2623    float a;
    27     if(ss>>a)
    28       return 1;
    29     else
    30       return 0;
     24    return (ss>>a);
    3125  }
    3226
     
    3529    std::stringstream ss(s);
    3630    int a;
    37     if(ss>>a)
    38       return 1;
    39     else
    40       return 0;
     31    return (ss>>a);
    4132  }
    4233
     
    5142  }
    5243
    53 
    5444}} // end of namespace utility and namespace thep
Note: See TracChangeset for help on using the changeset viewer.