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)
|
if (min_s.size() > 0)
|
||||||
{
|
{
|
||||||
int i;
|
if (!StringUtils::parseString<int>(min_s, &m_min))
|
||||||
std::istringstream myStream(min_s);
|
|
||||||
myStream >> i;
|
|
||||||
bool is_number = (i!=0);
|
|
||||||
if (is_number)
|
|
||||||
{
|
{
|
||||||
m_min = i;
|
Log::warn("invalid value for spinner widget minimum value : %s", min_s.c_str());
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
std::cerr << "WARNING : invalid value for spinner widget minimum value : '" << min_s << "'\n";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (max_s.size() > 0)
|
if (max_s.size() > 0)
|
||||||
{
|
{
|
||||||
int i;
|
if (!StringUtils::parseString<int>(max_s, &m_max))
|
||||||
std::istringstream myStream(max_s);
|
{
|
||||||
myStream >> i;
|
Log::warn("invalid value for spinner widget maximum value : %s", max_s.c_str());
|
||||||
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";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user