mirror of
https://github.com/OpenMW/openmw.git
synced 2025-06-20 17:11:33 +00:00
Print a warning in case a fallback value wasn't found
This commit is contained in:
parent
e4531a6910
commit
002ad9ae1b
1 changed files with 7 additions and 4 deletions
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue