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:
parent
f3b72eee81
commit
734aa6e411
@ -129,7 +129,7 @@
|
|||||||
A spinner component (lets you choose numbers).
|
A spinner component (lets you choose numbers).
|
||||||
|
|
||||||
Specify PROP_MIN_VALUE and PROP_MAX_VALUE to have control over values
|
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
|
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
|
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
|
possible value the spinner can take. It may also display arbitrary text
|
||||||
|
@ -37,6 +37,8 @@ SpinnerWidget::SpinnerWidget(const bool gauge) : Widget(WTYPE_SPINNER)
|
|||||||
m_check_inside_me = true; //FIXME: not sure this is necessary
|
m_check_inside_me = true; //FIXME: not sure this is necessary
|
||||||
m_supports_multiplayer = true;
|
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");
|
m_warp_around = (m_properties[PROP_WARP_AROUND] == "true");
|
||||||
|
|
||||||
|
if (min_s.size() > 0)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
std::istringstream myStream(min_s);
|
std::istringstream myStream(min_s);
|
||||||
@ -59,10 +62,11 @@ void SpinnerWidget::add()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
std::cerr << "WARNING : invalid value from spinner widget minimum value '" << min_s << "'\n";
|
std::cerr << "WARNING : invalid value for spinner widget minimum value : '" << min_s << "'\n";
|
||||||
m_min = 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (max_s.size() > 0)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
std::istringstream myStream(max_s);
|
std::istringstream myStream(max_s);
|
||||||
@ -73,8 +77,7 @@ void SpinnerWidget::add()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
std::cerr << "WARNING : invalid value from spinner widget maximal value '" << max_s << "'\n";
|
std::cerr << "WARNING : invalid value for spinner widget maximal value : '" << max_s << "'\n";
|
||||||
m_max = 10;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user