diff --git a/code/nel/include/nel/misc/fixed_size_allocator.h b/code/nel/include/nel/misc/fixed_size_allocator.h index ffc975250..643217f5d 100644 --- a/code/nel/include/nel/misc/fixed_size_allocator.h +++ b/code/nel/include/nel/misc/fixed_size_allocator.h @@ -53,7 +53,7 @@ public: uint getNumAllocatedBlocks() const { return _NumAlloc; } private: class CChunk; - + class NL_ALIGN(NL_DEFAULT_MEMORY_ALIGNMENT) CNode { public: diff --git a/code/nel/include/nel/misc/mouse_smoother.h b/code/nel/include/nel/misc/mouse_smoother.h index f909cde96..18d741996 100644 --- a/code/nel/include/nel/misc/mouse_smoother.h +++ b/code/nel/include/nel/misc/mouse_smoother.h @@ -46,7 +46,7 @@ public: double getSamplingPeriod() const { return _SamplingPeriod; } // Reset smoother. The next returned position will be the exact position of mouse (no smoothing with previous position is done) void reset(); - // \return trueif no sampling has occurred since last resetor construction + // \return true if no sampling has occurred since last resetor construction bool isReseted() const { return !_Init; } // Sample pos, and return smoothed position CVector2f samplePos(const CVector2f &wantedPos, double date); diff --git a/code/nel/src/gui/group_menu.cpp b/code/nel/src/gui/group_menu.cpp index d2e11a2c9..7d002cfd6 100644 --- a/code/nel/src/gui/group_menu.cpp +++ b/code/nel/src/gui/group_menu.cpp @@ -1802,7 +1802,7 @@ namespace NLGUI return 0; } - // ------------------------------------------------------------------------------------------------ + // ------------------------------------------------------------------------------------------------ int CGroupSubMenu::luaAddIconLine(CLuaState &ls) { const char *funcName = "addIconLine"; diff --git a/code/nel/src/misc/common.cpp b/code/nel/src/misc/common.cpp index bb6badd18..db605f4f1 100644 --- a/code/nel/src/misc/common.cpp +++ b/code/nel/src/misc/common.cpp @@ -633,7 +633,7 @@ void toLower(char *str) } } -std::string toUpper(const std::string &str) +std::string toUpper(const std::string &str) { string res; res.reserve(str.size()); @@ -647,7 +647,7 @@ std::string toUpper(const std::string &str) return res; } -void toUpper(char *str) +void toUpper(char *str) { if (str == 0) return; @@ -1356,7 +1356,7 @@ std::string escapeArgument(const std::string &arg) // we can't escape %VARIABLE% on command-line under Windows return arg; #else - // characters to escapce, only " and $ (to prevent a $something replaced by an environment variable) + // characters to escape, only " and $ (to prevent a $something replaced by an environment variable) static const char s_charsToEscape[] = "\"$"; std::string res; diff --git a/code/nel/src/net/unified_network.cpp b/code/nel/src/net/unified_network.cpp index 3a57b4b0d..2589e1cbf 100644 --- a/code/nel/src/net/unified_network.cpp +++ b/code/nel/src/net/unified_network.cpp @@ -828,7 +828,6 @@ void CUnifiedNetwork::addService(const string &name, const vector for (uint i = 0; i < addr.size(); i++) { // first we have to look if we have a network that can established the connection - uint j = 0; // it's loopback ip address, it's ok diff --git a/code/ryzom/client/src/entities.cpp b/code/ryzom/client/src/entities.cpp index b46d7ce29..2e5555b79 100644 --- a/code/ryzom/client/src/entities.cpp +++ b/code/ryzom/client/src/entities.cpp @@ -800,7 +800,8 @@ bool CEntityManager::setupInstance(uint32 idx, const vector &keys, const if (param == "transparency") { uint t; - if( fromString( values[i], t ) ) { + if (fromString(values[i], t)) + { t = max(0, min((int)t, 255)); makeInstanceTransparent(instance, t, t == 255); } @@ -864,9 +865,12 @@ bool CEntityManager::setupInstance(uint32 idx, const vector &keys, const float v; CVector pos = getInstancePos(idx); - if( getRelativeFloatFromString( values[i], v ) ) { + if (getRelativeFloatFromString(values[i], v)) + { updateVector(param, pos, v, true); - } else { + } + else + { updateVector(param, pos, v, false); } setInstancePos(idx, pos); @@ -877,9 +881,12 @@ bool CEntityManager::setupInstance(uint32 idx, const vector &keys, const float v; CVector rot = getInstanceRot(idx); - if( getRelativeFloatFromString( values[i], v ) ) { + if (getRelativeFloatFromString(values[i], v)) + { updateVector(param, rot, v, true); - } else { + } + else + { updateVector(param, rot, v, false); } setInstanceRot(idx, rot); @@ -889,9 +896,12 @@ bool CEntityManager::setupInstance(uint32 idx, const vector &keys, const float v; CVector scale = instance.getScale(); - if( getRelativeFloatFromString( values[i], v ) ) { + if (getRelativeFloatFromString(values[i], v)) + { updateVector(param, scale, v, true); - } else { + } + else + { updateVector(param, scale, v, false); } instance.setScale(scale); @@ -909,9 +919,12 @@ bool CEntityManager::setupInstance(uint32 idx, const vector &keys, const CVector size = CVector(width, depth, height); float v; - if( getRelativeFloatFromString( values[i], v ) ) { + if (getRelativeFloatFromString(values[i], v)) + { updateVector(param, size, v, true); - } else { + } + else + { updateVector(param, size, v, false); } primitive->setSize(size.x, size.y); @@ -922,9 +935,12 @@ bool CEntityManager::setupInstance(uint32 idx, const vector &keys, const CVector pos = instance.getPos(); float v; - if( getRelativeFloatFromString( values[i], v ) ) { + if (getRelativeFloatFromString(values[i], v)) + { updateVector(param, _ShapeInstances[idx].PrimRelativePos, v, false); - } else { + } + else + { if (param == "col pos x") _ShapeInstances[idx].PrimRelativePos.x = v - pos.x; if (param == "col pos y") @@ -1023,7 +1039,8 @@ CShapeInstanceReference CEntityManager::getShapeInstanceUnderPos(float x, float // if intersect the bbox NLMISC::CAABBox bbox; //= _ShapeInstances[i].SelectionBox; - if(!_ShapeInstances[i].Instance.empty()) { + if(!_ShapeInstances[i].Instance.empty()) + { _ShapeInstances[i].Instance.getShapeAABBox(bbox); CVector bbox_min; CVector bbox_max; diff --git a/code/ryzom/client/src/login_patch.cpp b/code/ryzom/client/src/login_patch.cpp index 27ade135e..5cf77aae7 100644 --- a/code/ryzom/client/src/login_patch.cpp +++ b/code/ryzom/client/src/login_patch.cpp @@ -1033,7 +1033,7 @@ void CPatchManager::executeBatchFile() if (!LoginLogin.empty()) { arguments.push_back(LoginLogin); - + if (!LoginPassword.empty()) { // encode password in hexadecimal to avoid invalid characters on command-line