From 836c563c8971843f8a6fba233fac256395f9b882 Mon Sep 17 00:00:00 2001 From: Christian Schmitt Date: Tue, 4 Sep 2012 10:27:07 +0200 Subject: [PATCH] Signs: if the size is not allowed by the spec, print out a more meaningful warning to help identify the problematic line. --- simgear/scene/tgdb/apt_signs.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/simgear/scene/tgdb/apt_signs.cxx b/simgear/scene/tgdb/apt_signs.cxx index 019d9f32..a04c1a3b 100644 --- a/simgear/scene/tgdb/apt_signs.cxx +++ b/simgear/scene/tgdb/apt_signs.cxx @@ -376,7 +376,7 @@ void AirportSignBuilder::addSign(const SGGeod& pos, double heading, const std::s if (n == "@Y") { if (size > 3) { size = -1; - SG_LOG(SG_TERRAIN, SG_ALERT, SIGN "Wrong size for " << name << ". Allowed values are 1 to 3"); + SG_LOG(SG_TERRAIN, SG_ALERT, SIGN << content << " has wrong size. Allowed values are 1 to 3"); } sign_height = HT[size < 0 ? 3 : size]; newmat = "YellowSign"; @@ -386,7 +386,7 @@ void AirportSignBuilder::addSign(const SGGeod& pos, double heading, const std::s } else if (n == "@R") { if (size > 3) { size = -1; - SG_LOG(SG_TERRAIN, SG_ALERT, SIGN "Wrong size for " << name << ". Allowed values are 1 to 3"); + SG_LOG(SG_TERRAIN, SG_ALERT, SIGN << content << " has wrong size. Allowed values are 1 to 3"); } sign_height = HT[size < 0 ? 3 : size]; newmat = "RedSign"; @@ -396,7 +396,7 @@ void AirportSignBuilder::addSign(const SGGeod& pos, double heading, const std::s } else if (n == "@L") { if (size > 3) { size = -1; - SG_LOG(SG_TERRAIN, SG_ALERT, SIGN "Wrong size for " << name << ". Allowed values are 1 to 3"); + SG_LOG(SG_TERRAIN, SG_ALERT, SIGN << content << " has wrong size. Allowed values are 1 to 3"); } sign_height = HT[size < 0 ? 3 : size]; newmat = "FramedSign"; @@ -406,7 +406,7 @@ void AirportSignBuilder::addSign(const SGGeod& pos, double heading, const std::s } else if (n == "@B") { if ( (size != -1) && (size != 4) && (size != 5) ) { size = -1; - SG_LOG(SG_TERRAIN, SG_ALERT, SIGN "Wrong size for " << name << ". Allowed values are 4 or 5"); + SG_LOG(SG_TERRAIN, SG_ALERT, SIGN << content << " has wrong size. Allowed values are 4 or 5"); } sign_height = HT[size < 0 ? 4 : size]; newmat = "BlackSign"; -- 2.39.5