Changes on commits 2006-11-18T15:21:49Z!koraq@xs4all.nl and 2006-11-18T15:25:14Z!koraq@xs4all.nl;

grzywacz told me on IRC that there's already an integer to string
conversion template.

So switched the modulo routine to this template and removed the now
obsolete function.
This commit is contained in:
Mark de Wever 2006-11-18 20:15:32 +00:00
parent b5184ff042
commit 7da33efd90
3 changed files with 1 additions and 11 deletions

View file

@ -895,7 +895,7 @@ bool event_handler::handle_event_command(const queued_event& event_info,
return rval;
} else {
value %= divider;
var = utils::itoa(value);
var = str_cast(value);
}
}

View file

@ -387,13 +387,6 @@ bool string_bool(const std::string& str,bool def)
return def;
}
std::string itoa(const int value){
char buf[50];
snprintf(buf, sizeof(buf), "%d", value);
return buf;
}
bool isvalid_username(const std::string& username)
{
//check the username is valid (all alpha-numeric or space (but no space at ends))

View file

@ -62,9 +62,6 @@ std::string &strip(std::string &str);
bool has_value(std::string const &values, std::string const &val);
bool string_bool(const std::string& str,bool def=false);
//converts an integer to a string
std::string itoa(const int value);
/* checks the username is valid (all alpha-numeric or space (but no space at ends))
does not check length, disallow-list, or already in use */
bool isvalid_username(const std::string &login);