Use climits for ULONG_MAX rather than modern C++ option

This commit is contained in:
Klaas Freitag 2014-10-09 11:03:07 +02:00
parent d1c1a18226
commit 32fea6523f
2 changed files with 5 additions and 2 deletions

View File

@ -29,6 +29,8 @@
#include "ui_protocolwidget.h"
#include <climits>
namespace Mirall {
ProtocolWidget::ProtocolWidget(QWidget *parent) :
@ -262,7 +264,7 @@ void ProtocolWidget::computeResyncButtonEnabled()
void ProtocolWidget::slotProgressInfo( const QString& folder, const Progress::Info& progress )
{
if( progress._completedFileCount == std::numeric_limits<quint64>::max() ) {
if( progress._completedFileCount == ULLONG_MAX ) {
// The sync is restarting, clean the old items
cleanIgnoreItems(folder);
computeResyncButtonEnabled();

View File

@ -29,6 +29,7 @@
#include <unistd.h>
#endif
#include <climits>
#include <assert.h>
#include <QDebug>
@ -656,7 +657,7 @@ void SyncEngine::slotDiscoveryJobFinished(int discoveryResult)
// To announce the beginning of the sync
emit aboutToPropagate(_syncedItems);
_progressInfo._completedFileCount = std::numeric_limits<quint64>::max(); // indicate the start with max
_progressInfo._completedFileCount = ULLONG_MAX; // indicate the start with max
emit transmissionProgress(_progressInfo);
_progressInfo._completedFileCount = 0;