/[svn]/gigedit/trunk/src/gigedit/global.h
ViewVC logotype

Diff of /gigedit/trunk/src/gigedit/global.h

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

revision 3711 by schoenebeck, Tue Jul 30 12:22:16 2019 UTC revision 3712 by schoenebeck, Fri Jan 10 15:22:34 2020 UTC
# Line 1  Line 1 
1  /*                                                         -*- c++ -*-  /*                                                         -*- c++ -*-
2   * Copyright (C) 2007-2019 Andreas Persson   * Copyright (C) 2007-2020 Andreas Persson
3   *   *
4   * This program is free software; you can redistribute it and/or   * This program is free software; you can redistribute it and/or
5   * modify it under the terms of the GNU General Public License as   * modify it under the terms of the GNU General Public License as
# Line 148  inline static bool endsWith(const std::s Line 148  inline static bool endsWith(const std::s
148      return (caseSensitive) ? (sub == needle) : (!strcasecmp(sub.c_str(), needle.c_str()));      return (caseSensitive) ? (sub == needle) : (!strcasecmp(sub.c_str(), needle.c_str()));
149  }  }
150    
151    inline int getIndexOf(gig::Instrument* instrument) {
152        gig::File* file = (gig::File*) instrument->GetParent();
153        for (int i = 0; true ; ++i) {
154            gig::Instrument* instr = file->GetInstrument(i);
155            if (!instr) break;
156            if (instr == instrument) return i;
157        }
158        return -1;
159    }
160    
161  inline int getDimensionIndex(gig::dimension_t type, gig::Region* rgn) {  inline int getDimensionIndex(gig::dimension_t type, gig::Region* rgn) {
162      for (uint i = 0; i < rgn->Dimensions; ++i)      for (uint i = 0; i < rgn->Dimensions; ++i)
163          if (rgn->pDimensionDefinitions[i].dimension == type)          if (rgn->pDimensionDefinitions[i].dimension == type)

Legend:
Removed from v.3711  
changed lines
  Added in v.3712

  ViewVC Help
Powered by ViewVC