mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-06 03:29:44 -06:00
Warnings and compile fixes for MSVC
This commit is contained in:
@@ -229,17 +229,17 @@ void DashboardItemGlobeLocation::render(glm::vec2& penPosition) {
|
||||
const bool isEast = lon > 0.0;
|
||||
lon = std::abs(lon);
|
||||
|
||||
const float latDeg = std::trunc(lat);
|
||||
const float latDegRemainder = lat - latDeg;
|
||||
const float latMin = std::trunc(latDegRemainder * 60.f);
|
||||
const float latMinRemainder = latDegRemainder * 60.f - latMin;
|
||||
const float latSec = latMinRemainder * 60.f;
|
||||
const double latDeg = std::trunc(lat);
|
||||
const double latDegRemainder = lat - latDeg;
|
||||
const double latMin = std::trunc(latDegRemainder * 60.f);
|
||||
const double latMinRemainder = latDegRemainder * 60.f - latMin;
|
||||
const double latSec = latMinRemainder * 60.f;
|
||||
|
||||
const float lonDeg = std::trunc(lon);
|
||||
const float lonDegRemainder = lon - lonDeg;
|
||||
const float lonMin = std::trunc(lonDegRemainder * 60.f);
|
||||
const float lonMinRemainder = lonDegRemainder * 60.f - lonMin;
|
||||
const float lonSec = lonMinRemainder * 60.f;
|
||||
const double lonDeg = std::trunc(lon);
|
||||
const double lonDegRemainder = lon - lonDeg;
|
||||
const double lonMin = std::trunc(lonDegRemainder * 60.f);
|
||||
const double lonMinRemainder = lonDegRemainder * 60.f - lonMin;
|
||||
const double lonSec = lonMinRemainder * 60.f;
|
||||
|
||||
|
||||
end = fmt::format_to(
|
||||
|
||||
@@ -74,10 +74,10 @@ namespace {
|
||||
|
||||
struct [[codegen::Dictionary(DashboardItemInstruments)]] Parameters {
|
||||
// [[codegen::verbatim(ActiveColorInfo.description)]]
|
||||
std::optional<glm::dvec3> activeColor [[codegen::color()]];
|
||||
std::optional<glm::vec3> activeColor [[codegen::color()]];
|
||||
|
||||
// [[codegen::verbatim(FlashColorInfo.description)]]
|
||||
std::optional<glm::dvec3> flashColor [[codegen::color()]];
|
||||
std::optional<glm::vec3> flashColor [[codegen::color()]];
|
||||
};
|
||||
#include "dashboarditeminstruments_codegen.cpp"
|
||||
} // namespace
|
||||
|
||||
@@ -253,21 +253,13 @@ void ProjectionComponent::initialize(const std::string& identifier,
|
||||
break;
|
||||
case Parameters::Type::ImageSequence:
|
||||
parsers.push_back(
|
||||
std::make_unique<LabelParser>(
|
||||
identifier,
|
||||
std::move(source),
|
||||
translations
|
||||
)
|
||||
std::make_unique<LabelParser>(std::move(source), translations)
|
||||
);
|
||||
break;
|
||||
case Parameters::Type::Hybrid:
|
||||
// first read labels
|
||||
parsers.push_back(
|
||||
std::make_unique<LabelParser>(
|
||||
identifier,
|
||||
std::move(source),
|
||||
translations
|
||||
)
|
||||
std::make_unique<LabelParser>(std::move(source), translations)
|
||||
);
|
||||
|
||||
if (p.eventFile.has_value()) {
|
||||
@@ -297,11 +289,7 @@ void ProjectionComponent::initialize(const std::string& identifier,
|
||||
case Parameters::Type::ImageAndInstrumentTimes:
|
||||
{
|
||||
parsers.push_back(
|
||||
std::make_unique<LabelParser>(
|
||||
identifier,
|
||||
std::move(source),
|
||||
translations
|
||||
)
|
||||
std::make_unique<LabelParser>(std::move(source), translations)
|
||||
);
|
||||
|
||||
if (!p.timesSequence.has_value()) {
|
||||
|
||||
@@ -315,19 +315,19 @@ TEST_CASE("Configuration: isRenderingOnMasterDisabled", "[configuration]") {
|
||||
TEST_CASE("Configuration: globalRotation", "[configuration]") {
|
||||
constexpr const char Extra[] = R"(GlobalRotation = { 1.0, 2.0, 3.0 })";
|
||||
const Configuration c = loadConfiguration("globalRotation", Extra);
|
||||
CHECK(c.globalRotation == glm::dvec3(1.0, 2.0, 3.0));
|
||||
CHECK(c.globalRotation == glm::vec3(1.0, 2.0, 3.0));
|
||||
}
|
||||
|
||||
TEST_CASE("Configuration: screenSpaceRotation", "[configuration]") {
|
||||
constexpr const char Extra[] = R"(ScreenSpaceRotation = { 1.0, 2.0, 3.0 })";
|
||||
const Configuration c = loadConfiguration("screenSpaceRotation", Extra);
|
||||
CHECK(c.screenSpaceRotation == glm::dvec3(1.0, 2.0, 3.0));
|
||||
CHECK(c.screenSpaceRotation == glm::vec3(1.0, 2.0, 3.0));
|
||||
}
|
||||
|
||||
TEST_CASE("Configuration: masterRotation", "[configuration]") {
|
||||
constexpr const char Extra[] = R"(MasterRotation = { 1.0, 2.0, 3.0 })";
|
||||
const Configuration c = loadConfiguration("masterRotation", Extra);
|
||||
CHECK(c.masterRotation == glm::dvec3(1.0, 2.0, 3.0));
|
||||
CHECK(c.masterRotation == glm::vec3(1.0, 2.0, 3.0));
|
||||
}
|
||||
|
||||
TEST_CASE("Configuration: isConsoleDisabled", "[configuration]") {
|
||||
@@ -381,12 +381,6 @@ ModuleConfigurations = {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("Configuration: renderingMethod", "[configuration]") {
|
||||
constexpr const char Extra[] = R"(RenderingMethod = "ABuffer")";
|
||||
const Configuration c = loadConfiguration("renderingMethod", Extra);
|
||||
CHECK(c.renderingMethod == "ABuffer");
|
||||
}
|
||||
|
||||
TEST_CASE("Configuration: openGLDebugContext", "[configuration]") {
|
||||
Configuration defaultConf;
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user