From 0eb82894f992507e9d4a46e416f7a89a2bfc4583 Mon Sep 17 00:00:00 2001 From: Rodney Date: Oct 07 2021 12:13:49 +0000 Subject: Merge pull request #4089 from shun-iwasawa/fix_spectrum Fix Spectrum --- diff --git a/toonz/sources/include/tspectrum.h b/toonz/sources/include/tspectrum.h index 8c57ef0..6e350fa 100644 --- a/toonz/sources/include/tspectrum.h +++ b/toonz/sources/include/tspectrum.h @@ -38,7 +38,11 @@ private: assert(!m_sortedKeys.empty()); typename std::vector::const_iterator b; b = std::lower_bound(m_sortedKeys.begin(), m_sortedKeys.end(), - ColorKey(s, T())); + ColorKey(s, T()), + [](const ColorKey &a, const ColorKey &b) { + return a.first < b.first; + }); // compare only key postions + if (b == m_sortedKeys.end()) return m_sortedKeys.rbegin()->second; else if (b == m_sortedKeys.begin() || areAlmostEqual(b->first, s))