/[svn]/libgig/trunk/src/tools/korg2gig.cpp
ViewVC logotype

Diff of /libgig/trunk/src/tools/korg2gig.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2909 by schoenebeck, Thu May 12 19:34:17 2016 UTC revision 3175 by schoenebeck, Thu May 11 11:34:19 2017 UTC
# Line 1  Line 1 
1  /***************************************************************************  /***************************************************************************
2   *                                                                         *   *                                                                         *
3   *   Copyright (C) 2014-2015 Christian Schoenebeck                         *   *   Copyright (C) 2014-2017 Christian Schoenebeck                         *
4   *                      <cuse@users.sourceforge.net>                       *   *                      <cuse@users.sourceforge.net>                       *
5   *                                                                         *   *                                                                         *
6   *   This program is part of libgig.                                       *   *   This program is part of libgig.                                       *
# Line 68  static bool beginsWith(const string& hay Line 68  static bool beginsWith(const string& hay
68  }  }
69    
70  static bool endsWith(const string& haystack, const string& needle) {  static bool endsWith(const string& haystack, const string& needle) {
71        if (haystack.size() < needle.size()) return false;
72      return haystack.substr(haystack.size() - needle.size(), needle.size()) == needle;      return haystack.substr(haystack.size() - needle.size(), needle.size()) == needle;
73  }  }
74    
# Line 214  inline string parseNumberRange(const str Line 215  inline string parseNumberRange(const str
215      stripWhiteSpace(w);      stripWhiteSpace(w);
216      stripLeftOrRightMarkerAtEnd(w);      stripLeftOrRightMarkerAtEnd(w);
217      string result = parseNumberRangeAtEnd(w, from, to);      string result = parseNumberRangeAtEnd(w, from, to);
218      if (result == w) return s; // parse error occured, return original input s      if (result == w) return s; // parse error occurred, return original input s
219      stripWhiteSpace(result);      stripWhiteSpace(result);
220      return result;      return result;
221  }  }
# Line 508  static void loadKorgFile(const string& f Line 509  static void loadKorgFile(const string& f
509          exit(EXIT_FAILURE);          exit(EXIT_FAILURE);
510      } catch (...) {      } catch (...) {
511          cerr << "Failed opening input file '" << filename << "':" << endl;          cerr << "Failed opening input file '" << filename << "':" << endl;
512          cerr << "Unknown exception occured while trying to access input file." << endl;          cerr << "Unknown exception occurred while trying to access input file." << endl;
513          exit(EXIT_FAILURE);          exit(EXIT_FAILURE);
514      }      }
515  }  }

Legend:
Removed from v.2909  
changed lines
  Added in v.3175

  ViewVC Help
Powered by ViewVC