mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 13:37:00 +00:00
[9381] Fixed some compile warnings.
This commit is contained in:
parent
2bdcb1161c
commit
ccfd42bf3e
55 changed files with 219 additions and 203 deletions
|
|
@ -46,6 +46,11 @@ double rand_norm(void)
|
|||
return mtRand->randExc ();
|
||||
}
|
||||
|
||||
float rand_norm_f(void)
|
||||
{
|
||||
return (float)mtRand->randExc ();
|
||||
}
|
||||
|
||||
double rand_chance (void)
|
||||
{
|
||||
return mtRand->randExc (100.0);
|
||||
|
|
@ -102,12 +107,12 @@ void stripLineInvisibleChars(std::string &str)
|
|||
str.erase(wpos,str.size());
|
||||
}
|
||||
|
||||
std::string secsToTimeString(uint32 timeInSecs, bool shortText, bool hoursOnly)
|
||||
std::string secsToTimeString(time_t timeInSecs, bool shortText, bool hoursOnly)
|
||||
{
|
||||
uint32 secs = timeInSecs % MINUTE;
|
||||
uint32 minutes = timeInSecs % HOUR / MINUTE;
|
||||
uint32 hours = timeInSecs % DAY / HOUR;
|
||||
uint32 days = timeInSecs / DAY;
|
||||
time_t secs = timeInSecs % MINUTE;
|
||||
time_t minutes = timeInSecs % HOUR / MINUTE;
|
||||
time_t hours = timeInSecs % DAY / HOUR;
|
||||
time_t days = timeInSecs / DAY;
|
||||
|
||||
std::ostringstream ss;
|
||||
if(days)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue