@@ -102,7 +102,7 @@ void CommandLineParser::parseArguments(int argc, char **argv, bool returnArgs) {
102102}
103103
104104void CommandLineParser::help () {
105- if (m_usageString.length ()) {
105+ if (! m_usageString.empty ()) {
106106 cout << m_argv0 << " - " << m_usageString << endl;
107107 }
108108 cout << " --help - This screen" << endl
@@ -138,7 +138,7 @@ void CommandLineParser::split(SVec &retval, string line, string match, bool igno
138138 }
139139 string part = line.substr (pos, current - last - 1 );
140140 // don't bother adding 0 length strings
141- if (part.length ()) {
141+ if (! part.empty ()) {
142142 retval.push_back (part);
143143 }
144144 last = current;
@@ -208,7 +208,7 @@ void CommandLineParser::printOptionValues() {
208208 for (SIMapConstIter iter = m_integerMap.begin (); m_integerMap.end () != iter; ++iter) {
209209 const string &description = m_variableDescriptionMap[iter->first ];
210210 cout << " " << setw (14 ) << iter->first << " = " << setw (14 ) << iter->second ;
211- if (description.length ()) {
211+ if (! description.empty ()) {
212212 cout << " - " << description;
213213 }
214214 cout << endl;
@@ -221,7 +221,7 @@ void CommandLineParser::printOptionValues() {
221221 for (SDMapConstIter iter = m_doubleMap.begin (); m_doubleMap.end () != iter; ++iter) {
222222 const string &description = m_variableDescriptionMap[iter->first ];
223223 cout << " " << setw (14 ) << iter->first << " = " << setw (14 ) << iter->second ;
224- if (description.length ()) {
224+ if (! description.empty ()) {
225225 cout << " - " << description;
226226 }
227227 cout << endl;
@@ -239,7 +239,7 @@ void CommandLineParser::printOptionValues() {
239239 } else {
240240 cout << " false" ;
241241 }
242- if (description.length ()) {
242+ if (! description.empty ()) {
243243 cout << " - " << description;
244244 }
245245 cout << endl;
@@ -254,7 +254,7 @@ void CommandLineParser::printOptionValues() {
254254 cout << " " << setw (14 ) << iter->first << " = " ;
255255 const string value = " '" + iter->second + " '" ;
256256 cout << setw (14 ) << " " ;
257- if (description.length ()) {
257+ if (! description.empty ()) {
258258 cout << " - " << description;
259259 }
260260 cout << endl << " " << value << endl;
@@ -269,7 +269,7 @@ void CommandLineParser::printOptionValues() {
269269 cout << " " << setw (14 ) << iter->first << " = " ;
270270 dumpSTL (iter->second );
271271 cout << endl;
272- if (description.length ()) {
272+ if (! description.empty ()) {
273273 cout << " - " << description;
274274 }
275275 cout << endl;
@@ -284,7 +284,7 @@ void CommandLineParser::printOptionValues() {
284284 cout << " " << setw (14 ) << iter->first << " = " ;
285285 dumpSTL (iter->second );
286286 cout << endl;
287- if (description.length ()) {
287+ if (! description.empty ()) {
288288 cout << " - " << description;
289289 }
290290 cout << endl;
@@ -299,7 +299,7 @@ void CommandLineParser::printOptionValues() {
299299 for (SSVecMapConstIter iter = m_stringVecMap.begin (); m_stringVecMap.end () != iter; ++iter) {
300300 const string &description = m_variableDescriptionMap[iter->first ];
301301 cout << " " << setw (14 ) << iter->first << " = " ;
302- if (description.length ()) {
302+ if (! description.empty ()) {
303303 cout << setw (14 ) << " "
304304 << " - " << description;
305305 }
@@ -601,7 +601,7 @@ void CommandLineParser::_finishDefaultOptions(std::string tag) {
601601 // Store lfn to pfn //
602602 // ////////////////////
603603 const string &kStorePrepend = stringValue (" storePrepend" );
604- if (kStorePrepend .length ()) {
604+ if (! kStorePrepend .empty ()) {
605605 string match = " /store/" ;
606606 int matchLen = match.length ();
607607 SVec tempVec;
@@ -623,7 +623,7 @@ void CommandLineParser::_finishDefaultOptions(std::string tag) {
623623 // //////////////////////////// //
624624 // ////////////////////////////////
625625 string outputFile = stringValue (" outputFile" );
626- bool modifyOutputFile = (outputFile.length ());
626+ bool modifyOutputFile = (! outputFile.empty ());
627627 outputFile = removeEnding (outputFile, " .root" );
628628 outputFile += tag;
629629 if (integerValue (" maxEvents" )) {
@@ -632,7 +632,7 @@ void CommandLineParser::_finishDefaultOptions(std::string tag) {
632632 if (integerValue (" jobID" ) >= 0 ) {
633633 outputFile += Form (" _jobID%03d" , integerValue (" jobID" ));
634634 }
635- if (stringValue (" tag" ).length ()) {
635+ if (! stringValue (" tag" ).empty ()) {
636636 outputFile += " _" + stringValue (" tag" );
637637 }
638638
0 commit comments