fix harmless spinner warning
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14474 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
6de5854ef8
commit
fc37766a6f
@ -62,33 +62,17 @@ void SpinnerWidget::add()
|
||||
|
||||
if (min_s.size() > 0)
|
||||
{
|
||||
int i;
|
||||
std::istringstream myStream(min_s);
|
||||
myStream >> i;
|
||||
bool is_number = (i!=0);
|
||||
if (is_number)
|
||||
if (!StringUtils::parseString<int>(min_s, &m_min))
|
||||
{
|
||||
m_min = i;
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cerr << "WARNING : invalid value for spinner widget minimum value : '" << min_s << "'\n";
|
||||
Log::warn("invalid value for spinner widget minimum value : %s", min_s.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
if (max_s.size() > 0)
|
||||
{
|
||||
int i;
|
||||
std::istringstream myStream(max_s);
|
||||
myStream >> i;
|
||||
bool is_number = (i!=0);
|
||||
if (is_number)
|
||||
{
|
||||
m_max = i;
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cerr << "WARNING : invalid value for spinner widget maximal value : '" << max_s << "'\n";
|
||||
if (!StringUtils::parseString<int>(max_s, &m_max))
|
||||
{
|
||||
Log::warn("invalid value for spinner widget maximum value : %s", max_s.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user