Merge pull request #1629

This commit is contained in:
scrawl 2018-03-16 23:26:50 +00:00
commit eb723f5ae6
No known key found for this signature in database
GPG key ID: 2E6CC3676024C402

View file

@ -1,5 +1,7 @@
#include "fallback.hpp" #include "fallback.hpp"
#include <iostream>
#include <boost/lexical_cast.hpp> #include <boost/lexical_cast.hpp>
@ -17,6 +19,7 @@ namespace Fallback
std::map<std::string,std::string>::const_iterator it; std::map<std::string,std::string>::const_iterator it;
if((it = mFallbackMap.find(fall)) == mFallbackMap.end()) if((it = mFallbackMap.find(fall)) == mFallbackMap.end())
{ {
std::cerr << "Warning: fallback value " << fall << " not found." << std::endl;
return ""; return "";
} }
return it->second; return it->second;
@ -53,7 +56,7 @@ namespace Fallback
{ {
std::string sum=getFallbackString(fall); std::string sum=getFallbackString(fall);
if (sum.empty()) if (sum.empty())
return osg::Vec4f(0.f,0.f,0.f,1.f); return osg::Vec4f(0.5f,0.5f,0.5f,1.f);
else else
{ {
std::string ret[3]; std::string ret[3];