#6344 Fix use of std::max

This commit is contained in:
Andrew Nelless 2017-01-24 16:21:06 +00:00 committed by Nick Bolton
parent 8af215364f
commit 828ad24820
2 changed files with 5 additions and 3 deletions

View File

@ -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;
}
}
}

View File

@ -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)