Removed extra qualifications

This commit is contained in:
Anonymous
2014-01-19 07:27:49 -07:00
parent 3a35aca06c
commit 1992bd0149
11 changed files with 84 additions and 76 deletions
@@ -180,7 +180,7 @@ public:
static const bool getEnableGoldDatabase (void);
static const NetworkId &getMaxGoldNetworkId (void);
static const float getDefaultQueueUpdateTimeLimit(void);
static const bool ConfigServerDatabase::getEnableDataCleanup(void);
static const bool getEnableDataCleanup(void);
static const int getDefaultLazyDeleteBulkBindSize (void);
static const int getDefaultLazyDeleteSleepTime (void);
static const int getWriteDelay (void);
@@ -34,7 +34,7 @@ namespace DBQuery {
GetChunkQuery(const std::string &schema);
private:
virtual DB::Query::QueryMode GetChunkQuery::getExecutionMode() const;
virtual QueryMode getExecutionMode() const;
private:
GetChunkQuery(const GetChunkQuery&); // disable
@@ -879,7 +879,8 @@ void JavaLibrary::fatalHandler(int signum)
else
{
// destroy Java threads
pthread_kill_other_threads_np();
// @note apathy - this pthread method is not in later versions of glibc
//pthread_kill_other_threads_np();
ms_instance = NULL;
ms_env = NULL;
ms_jvm = NULL;
@@ -5836,7 +5837,7 @@ const bool convert(const std::vector<NetworkId> &source, LocalLongArrayRefPtr &
return rv;
}
const bool ScriptConversion::convert(const jobject & source, Vector &target, NetworkId & targetCell)
const bool convert(const jobject & source, Vector &target, NetworkId & targetCell)
{
JNIEnv * env = JavaLibrary::getEnv();
if (!env)
@@ -5867,7 +5868,7 @@ const bool ScriptConversion::convert(const jobject & source, Vector &target, Net
return false;
}
const bool ScriptConversion::convertWorld(const jobject & source, Vector &target)
const bool convertWorld(const jobject & source, Vector &target)
{
JNIEnv * env = JavaLibrary::getEnv();
if (!env)
@@ -5900,7 +5901,7 @@ const bool ScriptConversion::convertWorld(const jobject & source, Vector &target
return false;
}
const bool ScriptConversion::convertWorld(const jlong & source, Vector &target)
const bool convertWorld(const jlong & source, Vector &target)
{
JNIEnv * env = JavaLibrary::getEnv();
if (!env)
@@ -5919,17 +5920,17 @@ const bool ScriptConversion::convertWorld(const jlong & source, Vector &target)
return false;
}
const bool ScriptConversion::convertWorld(const LocalRefParam & source, Vector &target)
const bool convertWorld(const LocalRefParam & source, Vector &target)
{
return convertWorld(source.getValue(), target);
}
const bool ScriptConversion::convert(const Vector & source, const NetworkId & sourceCell, LocalRefPtr & target)
const bool convert(const Vector & source, const NetworkId & sourceCell, LocalRefPtr & target)
{
return convert(source, ServerWorld::getSceneId(), sourceCell, target);
}
const bool ScriptConversion::convert(const jobject & source, Vector & targetLoc, std::string & targetSceneId, NetworkId & targetCell)
const bool convert(const jobject & source, Vector & targetLoc, std::string & targetSceneId, NetworkId & targetCell)
{
JNIEnv * env = JavaLibrary::getEnv();
if (!env)
@@ -5973,7 +5974,7 @@ const bool ScriptConversion::convert(const jobject & source, Vector & targetLoc,
return false;
}
const bool ScriptConversion::convertWorld(const jobject & source, Vector & targetLoc, std::string & targetSceneId)
const bool convertWorld(const jobject & source, Vector & targetLoc, std::string & targetSceneId)
{
JNIEnv * env = JavaLibrary::getEnv();
if (!env)
@@ -6019,7 +6020,7 @@ const bool ScriptConversion::convertWorld(const jobject & source, Vector & targe
return false;
}
const bool ScriptConversion::convert(const Location & sourceLoc, LocalRefPtr & target)
const bool convert(const Location & sourceLoc, LocalRefPtr & target)
{
JNIEnv * env = JavaLibrary::getEnv();
if (!env)
@@ -6042,7 +6043,7 @@ const bool ScriptConversion::convert(const Location & sourceLoc, LocalRefPtr &
return true;
}
const bool ScriptConversion::convert(const LocalRefParam & sourceLoc, Location & target)
const bool convert(const LocalRefParam & sourceLoc, Location & target)
{
JNIEnv * env = JavaLibrary::getEnv();
if (!env)
@@ -6069,7 +6070,7 @@ const bool ScriptConversion::convert(const LocalRefParam & sourceLoc, Location &
return true;
}
const bool ScriptConversion::convert(const LocalObjectArrayRefParam & sourceLoc, std::vector<Location> & target)
const bool convert(const LocalObjectArrayRefParam & sourceLoc, std::vector<Location> & target)
{
JNIEnv * env = JavaLibrary::getEnv();
if (!env)
@@ -6089,7 +6090,7 @@ const bool ScriptConversion::convert(const LocalObjectArrayRefParam & sourceLoc,
return true;
}
const bool ScriptConversion::convert(const Vector & sourceLoc, const std::string & sourceSceneId, const NetworkId & sourceCell, LocalRefPtr & target)
const bool convert(const Vector & sourceLoc, const std::string & sourceSceneId, const NetworkId & sourceCell, LocalRefPtr & target)
{
JNIEnv * env = JavaLibrary::getEnv();
if (!env)
@@ -6112,7 +6113,7 @@ const bool ScriptConversion::convert(const Vector & sourceLoc, const std::string
return true;
}
const bool ScriptConversion::convertWorld(const jobjectArray & source, std::vector<Vector> &target)
const bool convertWorld(const jobjectArray & source, std::vector<Vector> &target)
{
JNIEnv * env = JavaLibrary::getEnv();
if (!env)
@@ -6141,7 +6142,7 @@ const bool ScriptConversion::convertWorld(const jobjectArray & source, std::vect
return result && !target.empty();
}
const bool ScriptConversion::convert(const std::vector<const Vector *> & source, LocalObjectArrayRefPtr & target)
const bool convert(const std::vector<const Vector *> & source, LocalObjectArrayRefPtr & target)
{
JNIEnv * env = JavaLibrary::getEnv();
if (!env)
@@ -6175,14 +6176,14 @@ const bool ScriptConversion::convert(const std::vector<const Vector *> & source,
return result;
}
const bool ScriptConversion::convert(const LocalRefParam & source, const Region * & target)
const bool convert(const LocalRefParam & source, const Region * & target)
{
return convert(source.getValue(), target);
}
/** This method converts a java script.region class into a C++ Region class
*/
const bool ScriptConversion::convert(const jobject & source, const Region * &target)
const bool convert(const jobject & source, const Region * &target)
{
JNIEnv * env = JavaLibrary::getEnv();
if (env == NULL || source == NULL)
@@ -6206,7 +6207,7 @@ const bool ScriptConversion::convert(const jobject & source, const Region * &tar
/** This method converts a C++ RegionObject class into a Java script.region class
*/
const bool ScriptConversion::convert(const Region & source, LocalRefPtr & target)
const bool convert(const Region & source, LocalRefPtr & target)
{
JNIEnv * env = JavaLibrary::getEnv();
if (!env)
@@ -6234,7 +6235,7 @@ const bool ScriptConversion::convert(const Region & source, LocalRefPtr & target
// ----------------------------------------------------------------------
const bool ScriptConversion::convert(Transform const &sourceTransform, LocalRefPtr &target)
const bool convert(Transform const &sourceTransform, LocalRefPtr &target)
{
JNIEnv * const env = JavaLibrary::getEnv();
if (!env)
@@ -6253,7 +6254,7 @@ const bool ScriptConversion::convert(Transform const &sourceTransform, LocalRefP
// ----------------------------------------------------------------------
const bool ScriptConversion::convert(const jobject &sourceTransform, Transform &target)
const bool convert(const jobject &sourceTransform, Transform &target)
{
JNIEnv * const env = JavaLibrary::getEnv();
if (!env || !sourceTransform)
@@ -6285,14 +6286,14 @@ const bool ScriptConversion::convert(const jobject &sourceTransform, Transform &
// ----------------------------------------------------------------------
const bool ScriptConversion::convert(const LocalRefParam &sourceTransform, Transform &target)
const bool convert(const LocalRefParam &sourceTransform, Transform &target)
{
return convert(sourceTransform.getValue(), target);
}
// ----------------------------------------------------------------------
const bool ScriptConversion::convert(const jobjectArray & source, std::vector<Transform> &target)
const bool convert(const jobjectArray & source, std::vector<Transform> &target)
{
JNIEnv * const env = JavaLibrary::getEnv();
if (!env)
@@ -6322,7 +6323,7 @@ const bool ScriptConversion::convert(const jobjectArray & source, std::vector<Tr
// ----------------------------------------------------------------------
const bool ScriptConversion::convert(const std::vector<Transform> &source, LocalObjectArrayRefPtr & target)
const bool convert(const std::vector<Transform> &source, LocalObjectArrayRefPtr & target)
{
JNIEnv * const env = JavaLibrary::getEnv();
if (!env)
@@ -6362,7 +6363,7 @@ const bool ScriptConversion::convert(const std::vector<Transform> &source, Local
// ----------------------------------------------------------------------
const bool ScriptConversion::convert(const Vector &sourceVector, LocalRefPtr &target)
const bool convert(const Vector &sourceVector, LocalRefPtr &target)
{
JNIEnv *env = JavaLibrary::getEnv();
if (!env)
@@ -6380,7 +6381,7 @@ const bool ScriptConversion::convert(const Vector &sourceVector, LocalRefPtr &ta
// ----------------------------------------------------------------------
const bool ScriptConversion::convert(const jobject & sourceVector, Vector & target)
const bool convert(const jobject & sourceVector, Vector & target)
{
JNIEnv *env = JavaLibrary::getEnv();
if (!env || !sourceVector)
@@ -6396,7 +6397,7 @@ const bool ScriptConversion::convert(const jobject & sourceVector, Vector & targ
// ----------------------------------------------------------------------
const bool ScriptConversion::convert(const LocalRefParam & sourceVector, Vector & target)
const bool convert(const LocalRefParam & sourceVector, Vector & target)
{
return convert(sourceVector.getValue(), target);
}
+11 -8
View File
@@ -258,7 +258,7 @@ inline void AutoDeltaQueue<ValueType>::pack(ByteStream &target) const
{
cmd = ModifyCommand::PUSH;
Archive::put(target, cmd);
Archive::put(target, (*i));
put(target, (*i));
}
}
@@ -277,12 +277,12 @@ inline void AutoDeltaQueue<ValueType>::packDelta(ByteStream &target) const
{
case ModifyCommand::PUSH:
{
Archive::put(target, c.value);
put(target, c.value);
}
break;
case ModifyCommand::ERASE:
{
Archive::put(target, c.position);
put(target, c.position);
}
break;
}
@@ -317,6 +317,8 @@ inline void AutoDeltaQueue<ValueType>::push(ValueType const &value)
template<typename ValueType>
inline void AutoDeltaQueue<ValueType>::unpack(ReadIterator &source)
{
using Archive::get;
// unpacking baseline data
container.clear();
clearDelta();
@@ -331,7 +333,7 @@ inline void AutoDeltaQueue<ValueType>::unpack(ReadIterator &source)
{
Archive::get(source, c.cmd);
assert(c.cmd == ModifyCommand::PUSH); // only push valid for pack/unpack
Archive::get(source, c.value);
get(source, c.value);
container.push_back(c.value);
}
}
@@ -341,6 +343,7 @@ inline void AutoDeltaQueue<ValueType>::unpack(ReadIterator &source)
template<typename ValueType>
inline void AutoDeltaQueue<ValueType>::unpackDelta(ReadIterator &source)
{
using Archive::get;
ModifyCommand c;
size_t skipCount, commandCount, targetBaselineCommandCount;
@@ -364,12 +367,12 @@ inline void AutoDeltaQueue<ValueType>::unpackDelta(ReadIterator &source)
{
case ModifyCommand::PUSH:
{
Archive::get(source, c.value);
get(source, c.value);
}
break;
case ModifyCommand::ERASE:
{
Archive::get(source, c.position);
get(source, c.position);
}
break;
default:
@@ -384,13 +387,13 @@ inline void AutoDeltaQueue<ValueType>::unpackDelta(ReadIterator &source)
{
case ModifyCommand::PUSH:
{
Archive::get(source, c.value);
get(source, c.value);
AutoDeltaQueue::push(c.value);
}
break;
case ModifyCommand::ERASE:
{
Archive::get(source, c.position);
get(source, c.position);
AutoDeltaQueue::erase(c.position);
}
break;
+13 -14
View File
@@ -183,14 +183,13 @@ inline typename AutoDeltaSet<ValueType, ObjectType>::const_iterator AutoDeltaSet
c.value = *i;
m_commands.push_back(c);
++m_baselineCommandCount;
#ifdef WIN32
typename SetType::iterator tmp(m_set.begin());
// @note apathy - hack to convert from const_iterator to iterator as requried by STLPort
typename SetType::iterator tmp(m_set.begin());
std::advance(tmp, std::distance<const_iterator>(tmp, i));
i++;
m_set.erase(tmp);
#else
m_set.erase(i++);
#endif
touch();
onErase(c.value);
onChanged();
@@ -305,7 +304,7 @@ inline void AutoDeltaSet<ValueType, ObjectType>::pack(ByteStream &target) const
Archive::put(target, m_set.size());
Archive::put(target, m_baselineCommandCount);
for (typename SetType::const_iterator i = m_set.begin(); i != m_set.end(); ++i)
Archive::put(target, *i);
put(target, *i);
}
// ----------------------------------------------------------------------
@@ -316,7 +315,7 @@ inline void AutoDeltaSet<ValueType, ObjectType>::pack(ByteStream &target, std::s
Archive::put(target, data.size());
Archive::put(target, static_cast<size_t>(0)); // baselineCommandCount
for (typename std::set<ValueType>::const_iterator i = data.begin(); i != data.end(); ++i)
Archive::put(target, *i);
put(target, *i);
}
//-----------------------------------------------------------------------
@@ -334,7 +333,7 @@ inline void AutoDeltaSet<ValueType, ObjectType>::packDelta(ByteStream &target) c
{
case Command::ERASE:
case Command::INSERT:
Archive::put(target, c.value);
put(target, c.value);
break;
case Command::CLEAR:
break;
@@ -421,10 +420,10 @@ inline void AutoDeltaSet<ValueType, ObjectType>::unpack(ReadIterator &source)
Archive::get(source, commandCount);
Archive::get(source, m_baselineCommandCount);
using Archive::get;
for (size_t i = 0; i < commandCount; ++i)
{
Archive::get(source, value);
get(source, value);
m_set.insert(value);
}
@@ -485,6 +484,7 @@ inline void AutoDeltaSet<ValueType, ObjectType>::unpackDelta(ReadIterator &sourc
template<typename ValueType, typename ObjectType>
inline void AutoDeltaSet<ValueType, ObjectType>::unpackDelta(ReadIterator &source)
{
using Archive::get;
Command c;
size_t skipCount, commandCount, targetBaselineCommandCount;
@@ -508,7 +508,7 @@ inline void AutoDeltaSet<ValueType, ObjectType>::unpackDelta(ReadIterator &sourc
{
Archive::get(source, c.cmd);
if (c.cmd != Command::CLEAR)
Archive::get(source, c.value);
get(source, c.value);
}
for ( ; i < commandCount; ++i)
{
@@ -516,11 +516,11 @@ inline void AutoDeltaSet<ValueType, ObjectType>::unpackDelta(ReadIterator &sourc
switch (c.cmd)
{
case Command::ERASE:
Archive::get(source, c.value);
get(source, c.value);
AutoDeltaSet::erase(c.value);
break;
case Command::INSERT:
Archive::get(source, c.value);
get(source, c.value);
AutoDeltaSet::insert(c.value);
break;
case Command::CLEAR:
@@ -541,4 +541,3 @@ inline void AutoDeltaSet<ValueType, ObjectType>::unpackDelta(ReadIterator &sourc
// ======================================================================
#endif // _INCLUDED__AutoDeltaSet_H
+27 -23
View File
@@ -1,4 +1,3 @@
#ifndef _INCLUDED_AutoDeltaVector_H
#define _INCLUDED_AutoDeltaVector_H
@@ -21,7 +20,7 @@ public:
typedef typename std::vector<ValueType>::const_iterator const_iterator;
typedef typename std::vector<ValueType>::const_reverse_iterator const_reverse_iterator;
typedef std::vector<ValueType> VectorType;
public:
struct Command
{
@@ -37,7 +36,7 @@ public:
unsigned short int index;
ValueType value;
};
public:
AutoDeltaVector();
explicit AutoDeltaVector(size_t initialSize);
@@ -372,7 +371,7 @@ inline void AutoDeltaVector<ValueType, ObjectType>::pack(ByteStream & target) co
typename std::vector<ValueType>::const_iterator i;
for (i = v.begin(); i != v.end(); ++i)
{
Archive::put(target, (*i));
put(target, (*i));
}
}
@@ -386,8 +385,8 @@ inline void AutoDeltaVector<ValueType, ObjectType>::pack(ByteStream & target, co
typename std::vector<ValueType>::const_iterator i;
for (i = data.begin(); i != data.end(); ++i)
{
Archive::put(target, *i);
}
put(target, *i);
}
}
//-----------------------------------------------------------------------
@@ -410,11 +409,11 @@ inline void AutoDeltaVector<ValueType, ObjectType>::packDelta(ByteStream & targe
break;
case Command::INSERT:
Archive::put(target, c.index);
Archive::put(target, c.value);
put(target, c.value);
break;
case Command::SET:
Archive::put(target, c.index);
Archive::put(target, c.value);
put(target, c.value);
break;
case Command::SETALL:
{
@@ -422,7 +421,7 @@ inline void AutoDeltaVector<ValueType, ObjectType>::packDelta(ByteStream & targe
for (unsigned int j = 0; j < c.index; ++j)
{
++i;
Archive::put(target, (*i).value);
put(target, (*i).value);
}
}
break;
@@ -515,7 +514,7 @@ inline void AutoDeltaVector<ValueType, ObjectType>::set(const unsigned int eleme
c.value = newValue;
commands.push_back(c);
++baselineCommandCount;
if(element >= v.size())
v.resize(element + 1);
@@ -616,8 +615,9 @@ inline const size_t AutoDeltaVector<ValueType, ObjectType>::size() const
//-----------------------------------------------------------------------
template<typename ValueType, typename ObjectType>
inline void AutoDeltaVector<ValueType, ObjectType>::unpack(ReadIterator & source)
inline void AutoDeltaVector<ValueType, ObjectType>::unpack(ReadIterator & source)
{
using Archive::get;
// unpacking the whole kazaba
v.clear();
clearDelta();
@@ -630,7 +630,7 @@ inline void AutoDeltaVector<ValueType, ObjectType>::unpack(ReadIterator & source
for (size_t i = 0; i < commandCount; ++i)
{
Archive::get(source, value);
get(source, value);
v.push_back(value);
}
@@ -642,6 +642,7 @@ inline void AutoDeltaVector<ValueType, ObjectType>::unpack(ReadIterator & source
template<typename ValueType, typename ObjectType>
inline void AutoDeltaVector<ValueType, ObjectType>::unpack(ReadIterator & source, std::vector<Command> & data)
{
using Archive::get;
// unpacking the whole kazaba
size_t commandCount;
size_t bcc;
@@ -652,10 +653,10 @@ inline void AutoDeltaVector<ValueType, ObjectType>::unpack(ReadIterator & source
for (size_t i = 0; i < commandCount; ++i)
{
Archive::get(source,c.value);
get(source,c.value);
c.index = static_cast<unsigned short int>(i);
c.cmd = Command::INSERT;
data.push_back(c);
}
}
@@ -665,6 +666,7 @@ inline void AutoDeltaVector<ValueType, ObjectType>::unpack(ReadIterator & source
template<typename ValueType, typename ObjectType>
inline void AutoDeltaVector<ValueType, ObjectType>::unpackDelta(ReadIterator & source, std::vector<Command> & data)
{
using Archive::get;
Command c;
size_t commandCount, targetBaselineCommandCount;
@@ -681,11 +683,11 @@ inline void AutoDeltaVector<ValueType, ObjectType>::unpackDelta(ReadIterator & s
break;
case Command::INSERT:
Archive::get(source, c.index);
Archive::get(source, c.value);
get(source, c.value);
break;
case Command::SET:
Archive::get(source, c.index);
Archive::get(source, c.value);
get(source, c.value);
break;
case Command::SETALL: // SETALL is not supported by the static AutoDeltaVector unpack function, because there's no place to put the value
assert(false);
@@ -696,7 +698,7 @@ inline void AutoDeltaVector<ValueType, ObjectType>::unpackDelta(ReadIterator & s
break;
}
data.push_back(c);
}
}
}
//-----------------------------------------------------------------------
@@ -704,6 +706,7 @@ inline void AutoDeltaVector<ValueType, ObjectType>::unpackDelta(ReadIterator & s
template<typename ValueType, typename ObjectType>
inline void AutoDeltaVector<ValueType, ObjectType>::unpackDelta(ReadIterator & source)
{
using Archive::get;
Command c;
size_t skipCount, commandCount, targetBaselineCommandCount;
@@ -727,11 +730,11 @@ inline void AutoDeltaVector<ValueType, ObjectType>::unpackDelta(ReadIterator & s
for (unsigned int j = 0; j < c.index; ++j)
{
++i;
Archive::get(source, c.value);
get(source, c.value);
}
}
else if (c.cmd != Command::ERASE && c.cmd != Command::CLEAR)
Archive::get(source, c.value);
get(source, c.value);
}
for ( ; i < commandCount; ++i)
{
@@ -740,21 +743,21 @@ inline void AutoDeltaVector<ValueType, ObjectType>::unpackDelta(ReadIterator & s
{
case Command::ERASE:
{
Archive::get(source, c.index);
get(source, c.index);
AutoDeltaVector::erase(c.index);
}
break;
case Command::INSERT:
{
Archive::get(source, c.index);
Archive::get(source, c.value);
get(source, c.value);
AutoDeltaVector::insert(c.index, c.value);
}
break;
case Command::SET:
{
Archive::get(source, c.index);
Archive::get(source, c.value);
get(source, c.value);
AutoDeltaVector::set(c.index, c.value);
}
break;
@@ -767,7 +770,7 @@ inline void AutoDeltaVector<ValueType, ObjectType>::unpackDelta(ReadIterator & s
for (unsigned int j = 0; j < c.index; ++j)
{
++i;
Archive::get(source, value);
get(source, value);
tempVec.push_back(value);
}
AutoDeltaVector::set(tempVec);
@@ -794,3 +797,4 @@ inline const ValueType & AutoDeltaVector<ValueType, ObjectType>::operator[] (con
#endif // _INCLUDED__AutoDeltaVector_H
@@ -190,3 +190,4 @@ inline void AutoDeltaVectorObserver<ValueType, Callback, SourceObjectType, Objec
#endif
@@ -448,7 +448,7 @@ protected:
void ignorePersistedFlag (const NetworkId &objectId, Archive::ReadIterator &data) const;
OfflineMoneyCustomPersistStep * SwgSnapshot::getOfflineMoneyCustomPersistStep();
OfflineMoneyCustomPersistStep * getOfflineMoneyCustomPersistStep();
private:
SwgSnapshot(const SwgSnapshot&); //disable
@@ -65,7 +65,7 @@ namespace DBQuery
virtual bool bindParameters();
virtual bool bindColumns();
virtual void getSQL(std::string &sql);
virtual QueryMode GetAllManufactureSchematicAttributes::getExecutionMode() const;
virtual QueryMode getExecutionMode() const;
private:
GetAllManufactureSchematicAttributes(const GetAllManufactureSchematicAttributes&); // disable
@@ -90,7 +90,7 @@ namespace DBQuery
virtual bool bindParameters();
virtual bool bindColumns();
virtual void getSQL(std::string &sql);
virtual QueryMode GetAllPropertyLists::getExecutionMode() const;
virtual QueryMode getExecutionMode() const;
private:
GetAllPropertyLists(const GetAllPropertyLists&); // disable
@@ -73,7 +73,7 @@ namespace DBQuery
virtual bool bindParameters();
virtual bool bindColumns();
virtual void getSQL(std::string &sql);
virtual QueryMode GetAllSkills::getExecutionMode() const;
virtual QueryMode getExecutionMode() const;
private:
GetAllSkills(const GetAllSkills&); // disable