From 1364f0622c4d6e7d07c91dfd2cd834bb2c3bae1b Mon Sep 17 00:00:00 2001 From: Sebastian Hahta <joseha@utu.fi> Date: Wed, 5 Jun 2019 16:26:08 +0300 Subject: [PATCH] comparison with string literal results in unspecified behavior [-Waddress] --- components/rgbd-sources/src/rgbd_source.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/rgbd-sources/src/rgbd_source.cpp b/components/rgbd-sources/src/rgbd_source.cpp index 9a8d1c08b..83ded9fcd 100644 --- a/components/rgbd-sources/src/rgbd_source.cpp +++ b/components/rgbd-sources/src/rgbd_source.cpp @@ -54,7 +54,7 @@ bool RGBDSource::snapshot(const std::string &fileprefix) { RGBDSource *RGBDSource::create(nlohmann::json &config, ftl::net::Universe *net) { auto &cfg = ftl::config::resolve(config); - if (cfg["type"].type_name() != "string") { + if (!cfg["type"].is_string()) { LOG(ERROR) << "Missing RGB-D source type: " << cfg["type"].type_name(); //return nullptr; } -- GitLab