From 1992bd0149aaaac036b1abee073b996ad92366f2 Mon Sep 17 00:00:00 2001 From: Anonymous Date: Sun, 19 Jan 2014 07:27:49 -0700 Subject: [PATCH] Removed extra qualifications --- .../src/shared/ConfigServerDatabase.h | 2 +- .../serverDatabase/src/shared/GetChunkQuery.h | 2 +- .../serverScript/src/shared/JavaLibrary.cpp | 51 ++++++++++--------- .../archive/src/shared/AutoDeltaQueue.h | 19 ++++--- .../library/archive/src/shared/AutoDeltaSet.h | 27 +++++----- .../archive/src/shared/AutoDeltaVector.h | 50 +++++++++--------- .../src/shared/AutoDeltaVectorObserver.h | 1 + .../src/shared/core/SwgSnapshot.h | 2 +- .../ManufactureSchematicAttributeQuery.h | 2 +- .../src/shared/queries/PropertyListQuery.h | 2 +- .../src/shared/queries/SkillQuery.h | 2 +- 11 files changed, 84 insertions(+), 76 deletions(-) diff --git a/engine/server/library/serverDatabase/src/shared/ConfigServerDatabase.h b/engine/server/library/serverDatabase/src/shared/ConfigServerDatabase.h index f909f5f9..e7c3aa1c 100644 --- a/engine/server/library/serverDatabase/src/shared/ConfigServerDatabase.h +++ b/engine/server/library/serverDatabase/src/shared/ConfigServerDatabase.h @@ -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); diff --git a/engine/server/library/serverDatabase/src/shared/GetChunkQuery.h b/engine/server/library/serverDatabase/src/shared/GetChunkQuery.h index 60ee1d29..b99382d2 100644 --- a/engine/server/library/serverDatabase/src/shared/GetChunkQuery.h +++ b/engine/server/library/serverDatabase/src/shared/GetChunkQuery.h @@ -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 diff --git a/engine/server/library/serverScript/src/shared/JavaLibrary.cpp b/engine/server/library/serverScript/src/shared/JavaLibrary.cpp index d6cb2448..f2c3ad70 100644 --- a/engine/server/library/serverScript/src/shared/JavaLibrary.cpp +++ b/engine/server/library/serverScript/src/shared/JavaLibrary.cpp @@ -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 &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 & target) +const bool convert(const LocalObjectArrayRefParam & sourceLoc, std::vector & 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 &target) +const bool convertWorld(const jobjectArray & source, std::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 & source, LocalObjectArrayRefPtr & target) +const bool convert(const std::vector & source, LocalObjectArrayRefPtr & target) { JNIEnv * env = JavaLibrary::getEnv(); if (!env) @@ -6175,14 +6176,14 @@ const bool ScriptConversion::convert(const std::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 &target) +const bool convert(const jobjectArray & source, std::vector &target) { JNIEnv * const env = JavaLibrary::getEnv(); if (!env) @@ -6322,7 +6323,7 @@ const bool ScriptConversion::convert(const jobjectArray & source, std::vector &source, LocalObjectArrayRefPtr & target) +const bool convert(const std::vector &source, LocalObjectArrayRefPtr & target) { JNIEnv * const env = JavaLibrary::getEnv(); if (!env) @@ -6362,7 +6363,7 @@ const bool ScriptConversion::convert(const std::vector &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); } diff --git a/external/ours/library/archive/src/shared/AutoDeltaQueue.h b/external/ours/library/archive/src/shared/AutoDeltaQueue.h index c2f6005f..5b29aacf 100644 --- a/external/ours/library/archive/src/shared/AutoDeltaQueue.h +++ b/external/ours/library/archive/src/shared/AutoDeltaQueue.h @@ -258,7 +258,7 @@ inline void AutoDeltaQueue::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::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::push(ValueType const &value) template inline void AutoDeltaQueue::unpack(ReadIterator &source) { + using Archive::get; + // unpacking baseline data container.clear(); clearDelta(); @@ -331,7 +333,7 @@ inline void AutoDeltaQueue::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::unpack(ReadIterator &source) template inline void AutoDeltaQueue::unpackDelta(ReadIterator &source) { + using Archive::get; ModifyCommand c; size_t skipCount, commandCount, targetBaselineCommandCount; @@ -364,12 +367,12 @@ inline void AutoDeltaQueue::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::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; diff --git a/external/ours/library/archive/src/shared/AutoDeltaSet.h b/external/ours/library/archive/src/shared/AutoDeltaSet.h index 95652240..a548dce4 100644 --- a/external/ours/library/archive/src/shared/AutoDeltaSet.h +++ b/external/ours/library/archive/src/shared/AutoDeltaSet.h @@ -183,14 +183,13 @@ inline typename AutoDeltaSet::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(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::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::pack(ByteStream &target, std::s Archive::put(target, data.size()); Archive::put(target, static_cast(0)); // baselineCommandCount for (typename std::set::const_iterator i = data.begin(); i != data.end(); ++i) - Archive::put(target, *i); + put(target, *i); } //----------------------------------------------------------------------- @@ -334,7 +333,7 @@ inline void AutoDeltaSet::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::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::unpackDelta(ReadIterator &sourc template inline void AutoDeltaSet::unpackDelta(ReadIterator &source) { + using Archive::get; Command c; size_t skipCount, commandCount, targetBaselineCommandCount; @@ -508,7 +508,7 @@ inline void AutoDeltaSet::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::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::unpackDelta(ReadIterator &sourc // ====================================================================== #endif // _INCLUDED__AutoDeltaSet_H - diff --git a/external/ours/library/archive/src/shared/AutoDeltaVector.h b/external/ours/library/archive/src/shared/AutoDeltaVector.h index 0f0b4e03..5d2d37bf 100644 --- a/external/ours/library/archive/src/shared/AutoDeltaVector.h +++ b/external/ours/library/archive/src/shared/AutoDeltaVector.h @@ -1,4 +1,3 @@ - #ifndef _INCLUDED_AutoDeltaVector_H #define _INCLUDED_AutoDeltaVector_H @@ -21,7 +20,7 @@ public: typedef typename std::vector::const_iterator const_iterator; typedef typename std::vector::const_reverse_iterator const_reverse_iterator; typedef std::vector 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::pack(ByteStream & target) co typename std::vector::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::pack(ByteStream & target, co typename std::vector::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::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::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::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::size() const //----------------------------------------------------------------------- template -inline void AutoDeltaVector::unpack(ReadIterator & source) +inline void AutoDeltaVector::unpack(ReadIterator & source) { + using Archive::get; // unpacking the whole kazaba v.clear(); clearDelta(); @@ -630,7 +630,7 @@ inline void AutoDeltaVector::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::unpack(ReadIterator & source template inline void AutoDeltaVector::unpack(ReadIterator & source, std::vector & data) { + using Archive::get; // unpacking the whole kazaba size_t commandCount; size_t bcc; @@ -652,10 +653,10 @@ inline void AutoDeltaVector::unpack(ReadIterator & source for (size_t i = 0; i < commandCount; ++i) { - Archive::get(source,c.value); + get(source,c.value); c.index = static_cast(i); c.cmd = Command::INSERT; - + data.push_back(c); } } @@ -665,6 +666,7 @@ inline void AutoDeltaVector::unpack(ReadIterator & source template inline void AutoDeltaVector::unpackDelta(ReadIterator & source, std::vector & data) { + using Archive::get; Command c; size_t commandCount, targetBaselineCommandCount; @@ -681,11 +683,11 @@ inline void AutoDeltaVector::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::unpackDelta(ReadIterator & s break; } data.push_back(c); - } + } } //----------------------------------------------------------------------- @@ -704,6 +706,7 @@ inline void AutoDeltaVector::unpackDelta(ReadIterator & s template inline void AutoDeltaVector::unpackDelta(ReadIterator & source) { + using Archive::get; Command c; size_t skipCount, commandCount, targetBaselineCommandCount; @@ -727,11 +730,11 @@ inline void AutoDeltaVector::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::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::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::operator[] (con #endif // _INCLUDED__AutoDeltaVector_H + diff --git a/external/ours/library/archive/src/shared/AutoDeltaVectorObserver.h b/external/ours/library/archive/src/shared/AutoDeltaVectorObserver.h index 75447dc6..516e6b9f 100644 --- a/external/ours/library/archive/src/shared/AutoDeltaVectorObserver.h +++ b/external/ours/library/archive/src/shared/AutoDeltaVectorObserver.h @@ -190,3 +190,4 @@ inline void AutoDeltaVectorObserver