mirror of
https://github.com/edubart/otclient.git
synced 2025-10-20 06:23:26 +02:00
replace all std::min/std::max with just min/max
This errors out in MSVC since the inclusion of winsock2.h, CL uses the macro not the template version.
This commit is contained in:
@@ -78,7 +78,7 @@ bool StaticText::addMessage(const std::string& name, Otc::MessageMode mode, cons
|
||||
m_updateEvent = nullptr;
|
||||
}
|
||||
|
||||
int delay = std::max<int>(Otc::STATIC_DURATION_PER_CHARACTER * text.length(), Otc::MIN_STATIC_TEXT_DURATION);
|
||||
int delay = max<int>(Otc::STATIC_DURATION_PER_CHARACTER * text.length(), Otc::MIN_STATIC_TEXT_DURATION);
|
||||
if(isYell())
|
||||
delay *= 2;
|
||||
|
||||
@@ -106,7 +106,7 @@ void StaticText::update()
|
||||
|
||||
void StaticText::scheduleUpdate()
|
||||
{
|
||||
int delay = std::max<int>(m_messages.front().second - g_clock.millis(), 0);
|
||||
int delay = max<int>(m_messages.front().second - g_clock.millis(), 0);
|
||||
|
||||
auto self = asStaticText();
|
||||
m_updateEvent = g_dispatcher.scheduleEvent([self]() {
|
||||
|
Reference in New Issue
Block a user