Suppressed unneeded warning from spinner widget

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@6063 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria 2010-09-19 17:22:49 +00:00
parent f3b72eee81
commit 734aa6e411
2 changed files with 8 additions and 5 deletions

View File

@ -129,7 +129,7 @@
A spinner component (lets you choose numbers).
Specify PROP_MIN_VALUE and PROP_MAX_VALUE to have control over values
(default will be from 0 to 10). You can specify an icon; then, include a
(default will be from 0 to 99). You can specify an icon; then, include a
sprintf format string like %i in the name, and at runtime the current number
will be inserted into the given name to find the right file for each
possible value the spinner can take. It may also display arbitrary text

View File

@ -37,6 +37,8 @@ SpinnerWidget::SpinnerWidget(const bool gauge) : Widget(WTYPE_SPINNER)
m_check_inside_me = true; //FIXME: not sure this is necessary
m_supports_multiplayer = true;
m_min = 0;
m_max = 999;
}
// -----------------------------------------------------------------------------
@ -49,6 +51,7 @@ void SpinnerWidget::add()
m_warp_around = (m_properties[PROP_WARP_AROUND] == "true");
if (min_s.size() > 0)
{
int i;
std::istringstream myStream(min_s);
@ -59,10 +62,11 @@ void SpinnerWidget::add()
}
else
{
std::cerr << "WARNING : invalid value from spinner widget minimum value '" << min_s << "'\n";
m_min = 0;
std::cerr << "WARNING : invalid value for spinner widget minimum value : '" << min_s << "'\n";
}
}
if (max_s.size() > 0)
{
int i;
std::istringstream myStream(max_s);
@ -73,8 +77,7 @@ void SpinnerWidget::add()
}
else
{
std::cerr << "WARNING : invalid value from spinner widget maximal value '" << max_s << "'\n";
m_max = 10;
std::cerr << "WARNING : invalid value for spinner widget maximal value : '" << max_s << "'\n";
}
}