Changeset 16427
- Timestamp:
- 05/29/13 14:03:15 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/mcore/ofits.h
r16331 r16427 63 63 { 64 64 key = Trim(key); 65 if (key. size()==0)65 if (key.empty()) 66 66 { 67 67 #ifdef __EXCEPTIONS … … 195 195 196 196 sout << "= "; 197 sout << ( value[0]=='\''?std::left:std::right);197 sout << (!value.empty() && value[0]=='\''?std::left:std::right); 198 198 sout << setw(20) << value << std::left; 199 199 200 if ( comment.size()>0)200 if (!comment.empty()) 201 201 sout << " / " << comment; 202 202 … … 428 428 bool SetStr(const string &key, string s, const string &comment="") 429 429 { 430 for ( string::iterator c=s.begin(); c<s.end(); c++)431 if ( *c=='\'')432 s.insert( c++, '\'');430 for (uint i=0; i<s.length(); i++) 431 if (s[i]=='\'') 432 s.insert(i++, "\'"); 433 433 434 434 return Set(key, true, "'"+s+"'", comment); … … 492 492 Set("END"); 493 493 while (fKeys.size()%36!=0) 494 fKeys. push_back(Key());494 fKeys.emplace_back(); 495 495 } 496 496 … … 596 596 597 597 Table::Column col; 598 598 599 col.name = name; 599 600 col.type = typechar;
Note:
See TracChangeset
for help on using the changeset viewer.