Skip to content
Snippets Groups Projects

fix: `npdet_info` string output should have quotes

Merged Christopher Dilks requested to merge npdet_info-string-quotes into master
1 file
+ 2
2
Compare changes
  • Side-by-side
  • Inline
@@ -199,7 +199,7 @@ int main (int argc, char *argv[]) {
@@ -199,7 +199,7 @@ int main (int argc, char *argv[]) {
fmt::print("{:<30}", c.first);
fmt::print("{:<30}", c.first);
if(s.value || s.all) {
if(s.value || s.all) {
if(((Constant)c.second).dataType()=="string")
if(((Constant)c.second).dataType()=="string")
fmt::print(" = {:>12s}", detector.constant<std::string>(c.first));
fmt::print(" = \"{:>s}\"", detector.constant<std::string>(c.first));
else
else
fmt::print(" = {:>12.3f}", double(detector.constant<double>(c.first)));
fmt::print(" = {:>12.3f}", double(detector.constant<double>(c.first)));
}
}
@@ -219,7 +219,7 @@ int main (int argc, char *argv[]) {
@@ -219,7 +219,7 @@ int main (int argc, char *argv[]) {
for (const auto& c : constants) {
for (const auto& c : constants) {
fmt::print("{:<30}", c.first);
fmt::print("{:<30}", c.first);
if(((Constant)c.second).dataType()=="string")
if(((Constant)c.second).dataType()=="string")
fmt::print(" = {:>12s}", detector.constant<std::string>(c.first));
fmt::print(" = \"{:>s}\"", detector.constant<std::string>(c.first));
else
else
fmt::print(" = {:>12.3f}", double(detector.constant<double>(c.first)));
fmt::print(" = {:>12.3f}", double(detector.constant<double>(c.first)));
fmt::print(" = {}", detector.constantAsString(c.first));
fmt::print(" = {}", detector.constantAsString(c.first));
Loading