#6344 Fix use of std::max
This commit is contained in:
parent
8af215364f
commit
828ad24820
|
@ -45,6 +45,7 @@
|
|||
#include <sstream>
|
||||
#include <fstream>
|
||||
#include <algorithm>
|
||||
#include <climits>
|
||||
|
||||
//
|
||||
// Client
|
||||
|
@ -75,7 +76,7 @@ Client::Client(
|
|||
m_useSecureNetwork(args.m_enableCrypto),
|
||||
m_args(args),
|
||||
m_enableClipboard(true),
|
||||
m_maximumClipboardSize(INT32_MAX)
|
||||
m_maximumClipboardSize(INT_MAX)
|
||||
{
|
||||
assert(m_socketFactory != NULL);
|
||||
assert(m_screen != NULL);
|
||||
|
@ -370,7 +371,7 @@ Client::setOptions(const OptionsList& options)
|
|||
} else if (id == kOptionClipboardSharingSize) {
|
||||
index++;
|
||||
if (index != options.end()) {
|
||||
m_maximumClipboardSize = std::max(0u, *index);
|
||||
m_maximumClipboardSize = *index;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -51,6 +51,7 @@
|
|||
#include <sstream>
|
||||
#include <fstream>
|
||||
#include <ctime>
|
||||
#include <climits>
|
||||
|
||||
//
|
||||
// Server
|
||||
|
@ -94,7 +95,7 @@ Server::Server(
|
|||
m_ignoreFileTransfer(false),
|
||||
m_disableLockToScreen(false),
|
||||
m_enableClipboard(true),
|
||||
m_maximumClipboardSize(INT32_MAX),
|
||||
m_maximumClipboardSize(INT_MAX),
|
||||
m_sendDragInfoThread(NULL),
|
||||
m_waitDragInfoThread(true),
|
||||
m_args(args)
|
||||
|
|
Loading…
Reference in New Issue