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