mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-15 09:02:30 +00:00
Fix variant type for systems where time_t is int
This commit is contained in:
parent
f77e8330ed
commit
d6818a122b
@ -73,7 +73,7 @@ config::attribute_value &config::attribute_value::operator=(size_t v)
|
||||
return *this;
|
||||
}
|
||||
|
||||
config::attribute_value &config::attribute_value::operator=(time_t v)
|
||||
config::attribute_value &config::attribute_value::operator=(long v)
|
||||
{
|
||||
value = v;
|
||||
return *this;
|
||||
@ -147,7 +147,7 @@ struct config_attribute_str_visitor : boost::static_visitor<std::string>
|
||||
{ return str_cast(s); }
|
||||
std::string operator()(int i) const
|
||||
{ return str_cast(i); }
|
||||
std::string operator()(time_t t) const
|
||||
std::string operator()(long t) const
|
||||
{ return str_cast(t); }
|
||||
std::string operator()(std::string const &s) const
|
||||
{ return s; }
|
||||
|
@ -172,7 +172,7 @@ public:
|
||||
*/
|
||||
class attribute_value
|
||||
{
|
||||
typedef boost::variant<boost::blank, bool, int, time_t, size_t,double, std::string, t_string> value_type;
|
||||
typedef boost::variant<boost::blank, bool, int, long, size_t,double, std::string, t_string> value_type;
|
||||
value_type value;
|
||||
|
||||
public:
|
||||
@ -189,7 +189,7 @@ public:
|
||||
attribute_value &operator=(int v);
|
||||
attribute_value &operator=(double v);
|
||||
attribute_value &operator=(size_t v);
|
||||
attribute_value &operator=(time_t v);
|
||||
attribute_value &operator=(long v);
|
||||
|
||||
attribute_value &operator=(const char *v)
|
||||
{ return operator=(std::string(v)); }
|
||||
|
Loading…
x
Reference in New Issue
Block a user