Mercurial > hg > nsaunier > traffic-intelligence
comparison c/utils.cpp @ 614:5e09583275a4
Merged Nicolas/trafficintelligence into default
| author | Mohamed Gomaa <eng.m.gom3a@gmail.com> |
|---|---|
| date | Fri, 05 Dec 2014 12:13:53 -0500 |
| parents | c389fae9689a |
| children | bee0e7407af7 |
comparison
equal
deleted
inserted
replaced
| 598:11f96bd08552 | 614:5e09583275a4 |
|---|---|
| 39 getline(f, s); | 39 getline(f, s); |
| 40 while ((!f.eof()) && (s[0] == ::commentChar)) { | 40 while ((!f.eof()) && (s[0] == ::commentChar)) { |
| 41 getline(f, s); | 41 getline(f, s); |
| 42 } | 42 } |
| 43 | 43 |
| 44 if (s[0] == ::commentChar) | 44 if (!s.empty() && s[0] == ::commentChar) |
| 45 s.clear(); | 45 s.clear(); |
| 46 return s; | 46 return s; |
| 47 } | 47 } |
| 48 | 48 |
| 49 void openWriteScientificPrecision(ofstream& out, const string& filename, const int& precision) { | 49 void openWriteScientificPrecision(ofstream& out, const string& filename, const int& precision) { |
