/[svn]/linuxsampler/trunk/src/db/InstrumentsDbUtilities.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/db/InstrumentsDbUtilities.cpp

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

revision 3100 by schoenebeck, Mon Jan 16 22:02:36 2017 UTC revision 3101 by schoenebeck, Sun Feb 5 18:03:58 2017 UTC
# Line 230  namespace LinuxSampler { Line 230  namespace LinuxSampler {
230      void SearchQuery::SetFormatFamilies(String s) {      void SearchQuery::SetFormatFamilies(String s) {
231          if (s.length() == 0) return;          if (s.length() == 0) return;
232          int i = 0;          int i = 0;
233          int j = s.find(',', 0);          int j = (int) s.find(',', 0);
234                    
235          while (j != std::string::npos) {          while (j != std::string::npos) {
236              FormatFamilies.push_back(s.substr(i, j - i));              FormatFamilies.push_back(s.substr(i, j - i));
237              i = j + 1;              i = j + 1;
238              j = s.find(',', i);              j = (int) s.find(',', i);
239          }          }
240                    
241          if (i < s.length()) FormatFamilies.push_back(s.substr(i));          if (i < s.length()) FormatFamilies.push_back(s.substr(i));
# Line 264  namespace LinuxSampler { Line 264  namespace LinuxSampler {
264      String SearchQuery::GetMin(String s) {      String SearchQuery::GetMin(String s) {
265          if (s.length() < 3) return "";          if (s.length() < 3) return "";
266          if (s.at(0) == '.' && s.at(1) == '.') return "";          if (s.at(0) == '.' && s.at(1) == '.') return "";
267          int i = s.find("..");          int i = (int) s.find("..");
268          if (i == std::string::npos) return "";          if (i == std::string::npos) return "";
269          return s.substr(0, i);          return s.substr(0, i);
270      }      }
# Line 272  namespace LinuxSampler { Line 272  namespace LinuxSampler {
272      String SearchQuery::GetMax(String s) {      String SearchQuery::GetMax(String s) {
273          if (s.length() < 3) return "";          if (s.length() < 3) return "";
274          if (s.find("..", s.length() - 2) != std::string::npos) return "";          if (s.find("..", s.length() - 2) != std::string::npos) return "";
275          int i = s.find("..");          int i = (int) s.find("..");
276          if (i == std::string::npos) return "";          if (i == std::string::npos) return "";
277          return s.substr(i + 2);          return s.substr(i + 2);
278      }      }

Legend:
Removed from v.3100  
changed lines
  Added in v.3101

  ViewVC Help
Powered by ViewVC