diff --git a/Jenkinsfile b/Jenkinsfile index 69935d0b96..e2d8a59ff7 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -51,16 +51,15 @@ parallel tools: { stage('tools/scm') { deleteDir(); gitHelper.checkoutGit(url, branch, false); - helper.createDirectory('build'); } stage('tools/cppcheck') { sh( - script: 'cppcheck --enable=all --xml --xml-version=2 -i ext --suppressions-list=support/cppcheck/suppressions.txt include modules src tests 2> build/cppcheck.xml', + script: 'cppcheck --enable=all --xml --xml-version=2 -i ext --suppressions-list=support/cppcheck/suppressions.txt include modules src tests 2> cppcheck.xml', label: 'CPPCheck' ) recordIssues( id: 'tools-cppcheck', - tool: cppCheck(pattern: 'build/cppcheck.xml') + tool: cppCheck(pattern: 'cppcheck.xml') ) } cleanWs() diff --git a/apps/OpenSpace/ext/sgct b/apps/OpenSpace/ext/sgct index 9fad60cfb2..5c5ffb9d2d 160000 --- a/apps/OpenSpace/ext/sgct +++ b/apps/OpenSpace/ext/sgct @@ -1 +1 @@ -Subproject commit 9fad60cfb2aabf1768e6129365fa64f2bb07d35e +Subproject commit 5c5ffb9d2d6039a7a40c668625188aaed45cb451 diff --git a/ext/ghoul b/ext/ghoul index 638b32ed52..580fe25d6c 160000 --- a/ext/ghoul +++ b/ext/ghoul @@ -1 +1 @@ -Subproject commit 638b32ed52bf100c2b029425d5a40462270bd18b +Subproject commit 580fe25d6ce12842f397b451601e815d03d95bec diff --git a/modules/globebrowsing/src/geojson/geojsonproperties.cpp b/modules/globebrowsing/src/geojson/geojsonproperties.cpp index de214a93d7..c30f1effa7 100644 --- a/modules/globebrowsing/src/geojson/geojsonproperties.cpp +++ b/modules/globebrowsing/src/geojson/geojsonproperties.cpp @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include #include @@ -100,10 +100,10 @@ namespace { } std::optional hexToRgb(std::string_view hexColor) { - glm::ivec3 rgb; - auto ret = scn::scan(hexColor, "#{:2x}{:2x}{:2x}", rgb.r, rgb.g, rgb.b); + auto ret = scn::scan(hexColor, "#{:2x}{:2x}{:2x}"); if (ret) { - return (1.f / 255.f) * glm::vec3(rgb); + auto [x, y, z] = ret->values(); + return (1.f / 255.f) * glm::vec3(x, y, z); } else { return std::nullopt; diff --git a/modules/kameleon/CMakeLists.txt b/modules/kameleon/CMakeLists.txt index 08ea00b1be..be25d7dc12 100644 --- a/modules/kameleon/CMakeLists.txt +++ b/modules/kameleon/CMakeLists.txt @@ -82,5 +82,4 @@ target_precompile_headers(ccmc PRIVATE "$<$:map>" "$<$:unordered_map>" "$<$:vector>" - "$<$:boost/unordered_map.hpp>" ) diff --git a/modules/kameleon/ext/kameleon b/modules/kameleon/ext/kameleon index 353c9f00f2..18aa3fdd93 160000 --- a/modules/kameleon/ext/kameleon +++ b/modules/kameleon/ext/kameleon @@ -1 +1 @@ -Subproject commit 353c9f00f24074dd296770217d53db3990352166 +Subproject commit 18aa3fdd932e5a4a8e6cd9725b88acaa1fdafb49 diff --git a/modules/skybrowser/skybrowsermodule_lua.inl b/modules/skybrowser/skybrowsermodule_lua.inl index 131fe47d3a..32c72c36c5 100644 --- a/modules/skybrowser/skybrowsermodule_lua.inl +++ b/modules/skybrowser/skybrowsermodule_lua.inl @@ -35,7 +35,7 @@ #include #include #include -#include +#include namespace { constexpr std::string_view _loggerCat = "SkyBrowserModule"; diff --git a/modules/space/kepler.cpp b/modules/space/kepler.cpp index 3da2484d7a..280352004f 100644 --- a/modules/space/kepler.cpp +++ b/modules/space/kepler.cpp @@ -28,8 +28,7 @@ #include #include #include -#include -#include +#include #include #include #include @@ -209,10 +208,13 @@ namespace { if (e.find('.') == std::string::npos) { e += ".0"; } - auto [res, year, daysInYear] = scn::scan_tuple(e, "{:2}{}"); + // @TODO(abock) The 'd' suffix can be removed when + // https://github.com/eliaskosunen/scnlib/issues/104 is fixed + auto res = scn::scan(e, "{:2d}{}"); if (!res) { throw ghoul::RuntimeError(fmt::format("Error parsing epoch '{}'", epoch)); } + auto [year, daysInYear] = res->values(); year += year > 57 ? 1900 : 2000; const int daysSince2000 = countDays(year); @@ -265,11 +267,11 @@ namespace { [](char c) { return c == '-'; } ); const std::string format = (nDashes == 2) ? "{:4}-{:2}-{:2}{}" : "{:4}{:2}{:2}{}"; - auto [res, year, monthNum, dayOfMonthNum, fractionOfDay] = - scn::scan_tuple(e, format); + auto res = scn::scan(e, scn::runtime_format(format)); if (!res) { throw ghoul::RuntimeError(fmt::format("Error parsing epoch '{}'", epoch)); } + auto [year, monthNum, dayOfMonthNum, fractionOfDay] = res->values(); const int daysSince2000 = countDays(year); const int wholeDaysInto = daysIntoGivenYear(year, monthNum, dayOfMonthNum); const double daysInYear = static_cast(wholeDaysInto) + fractionOfDay; @@ -330,25 +332,32 @@ namespace { // We have the first form int month = 0; int days = 0; - auto res = scn::scan( - epoch, "{:4}-{:2}-{:2}T{:2}:{:2}:{}", - date.year, month, days, date.hours, date.minutes, date.seconds + // @TODO(abock) The 'd' suffix can be removed when + // https://github.com/eliaskosunen/scnlib/issues/104 is fixed + auto res = scn::scan( + epoch, "{:4d}-{:2d}-{:2d}T{:2d}:{:2d}:{}" ); if (!res) { throw ghoul::RuntimeError(fmt::format("Error parsing epoch '{}'", epoch)); } + std::tie(date.year, month, days, date.hours, date.minutes, date.seconds) = + res->values(); date.nDays = daysIntoGivenYear(date.year, month, days); } else if (pos == 8) { // We have the second form - auto res = scn::scan( - epoch, "{:4}-{:3}T{:2}:{:2}:{}", - date.year, date.nDays, date.hours, date.minutes, date.seconds + // @TODO(abock) The 'd' suffix can be removed when + // https://github.com/eliaskosunen/scnlib/issues/104 is fixed + auto res = scn::scan( + epoch, "{:4d}-{:3d}T{:2d}:{:2d}:{}" + //date.year, date.nDays, date.hours, date.minutes, date.seconds ); if (!res) { throw ghoul::RuntimeError(fmt::format("Error parsing epoch '{}'", epoch)); } + std::tie(date.year, date.nDays, date.hours, date.minutes, date.seconds) = + res->values(); } else { throw ghoul::RuntimeError(fmt::format("Malformed epoch string '{}'", epoch)); diff --git a/modules/space/rendering/renderableconstellationlines.cpp b/modules/space/rendering/renderableconstellationlines.cpp index 22c6ffe78f..f7e0218ada 100644 --- a/modules/space/rendering/renderableconstellationlines.cpp +++ b/modules/space/rendering/renderableconstellationlines.cpp @@ -34,7 +34,7 @@ #include #include #include -#include +#include #include #include #include @@ -404,8 +404,9 @@ bool RenderableConstellationLines::readSpeckFile() { // Try to read three values for the position glm::vec3 pos; - auto reading = scn::scan(line, "{} {} {}", pos.x, pos.y, pos.z); + auto reading = scn::scan(line, "{} {} {}"); if (reading) { + std::tie(pos.x, pos.y, pos.z) = reading->values(); pos *= scale; constellationLine.vertices.push_back(pos.x); constellationLine.vertices.push_back(pos.y);