MCPcopy Create free account
hub / github.com/AcademySoftwareFoundation/OpenColorIO / upgradeToLatestVersion

Method upgradeToLatestVersion

src/OpenColorIO/Config.cpp:1332–1350  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1330}
1331
1332void Config::upgradeToLatestVersion() noexcept
1333{
1334 const auto wasVersion = m_impl->m_majorVersion;
1335 if (wasVersion != LastSupportedMajorVersion)
1336 {
1337 if (wasVersion == 1)
1338 {
1339 UpdateFileRulesFromV1ToV2(*this, m_impl->m_fileRules);
1340
1341 // The instance version is now 2.0
1342 m_impl->m_majorVersion = 2;
1343 m_impl->m_minorVersion = 0;
1344 }
1345
1346 static_assert(LastSupportedMajorVersion == 2, "Config: Handle newer versions");
1347 setMajorVersion(LastSupportedMajorVersion);
1348 setMinorVersion(LastSupportedMinorVersion[LastSupportedMajorVersion - 1]);
1349 }
1350}
1351
1352ConfigRcPtr Config::createEditableCopy() const
1353{

Callers 1

OCIO_ADD_TESTFunction · 0.80

Calls 1

Tested by 1

OCIO_ADD_TESTFunction · 0.64