2015-07-10 06:01:56 -07:00
|
|
|
/**
|
2019-03-31 13:56:13 -07:00
|
|
|
* @file local_version_holder.cpp
|
2015-07-10 06:01:56 -07:00
|
|
|
*
|
|
|
|
* @date Mar 19, 2014
|
2020-01-13 18:57:43 -08:00
|
|
|
* @author Andrey Belomutskiy, (c) 2012-2020
|
2015-07-10 06:01:56 -07:00
|
|
|
*/
|
|
|
|
|
2019-03-31 13:56:13 -07:00
|
|
|
#include "local_version_holder.h"
|
2015-07-10 06:01:56 -07:00
|
|
|
|
2019-06-07 00:50:04 -07:00
|
|
|
int LocalVersionHolder::getVersion() const {
|
2015-07-10 06:01:56 -07:00
|
|
|
return localVersion;
|
|
|
|
}
|
|
|
|
|
2019-01-15 18:51:09 -08:00
|
|
|
bool LocalVersionHolder::isOld(int globalVersion) {
|
|
|
|
if (globalVersion > localVersion) {
|
|
|
|
localVersion = globalVersion;
|
2015-07-10 06:01:56 -07:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|