diff --git a/src/pitch_interval.cpp b/src/pitch_interval.cpp index 0be8fe9..dc803a3 100644 --- a/src/pitch_interval.cpp +++ b/src/pitch_interval.cpp @@ -43,8 +43,8 @@ std::string intervalFillStr(const std::string& s, int n) { static std::unordered_map intervalCache; // Arrays and constants - match TypeScript implementation -const std::vector SIZES = {0, 2, 4, 5, 7, 9, 11}; -const std::string TYPES = "PMMPPMM"; +const std::array SIZES = {0, 2, 4, 5, 7, 9, 11}; +constexpr std::array TYPES = { 'P','M','M','P','P','M','M' }; // Define NoInterval - exactly like in TypeScript const Interval NoInterval = Interval(); @@ -246,17 +246,17 @@ Interval interval(const std::string& src, bool useCache) { } // Check cache first - if (useCache && intervalCache.find(src) != intervalCache.end()) { - return intervalCache[src]; - } + // if (useCache && intervalCache.find(src) != intervalCache.end()) { + // return intervalCache[src]; + // } // Parse string - using renamed function auto result = parseInterval(src); // Cache result if valid - if (useCache && !result.empty) { - intervalCache[src] = result; - } + // if (useCache && !result.empty) { + // intervalCache[src] = result; + // } return result; }