From 37f563d3d583eb8dcbddd33b6685ac138826518b Mon Sep 17 00:00:00 2001 From: TheSumm Date: Fri, 11 Dec 2015 01:51:55 +0100 Subject: [PATCH] Replaced some tabs with spaces --- src/client/creatures.cpp | 2 +- src/client/houses.cpp | 2 +- src/client/towns.cpp | 2 +- src/client/uiitem.cpp | 7 ++++--- src/framework/stdext/compiler.h | 8 ++++---- 5 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/client/creatures.cpp b/src/client/creatures.cpp index d26e1101..5af47ec9 100644 --- a/src/client/creatures.cpp +++ b/src/client/creatures.cpp @@ -394,7 +394,7 @@ SpawnPtr CreatureManager::addSpawn(const Position& centerPos, int radius) auto iter = m_spawns.find(centerPos); if(iter != m_spawns.end()) { if(iter->second->getRadius() != radius) - iter->second->setRadius(radius); + iter->second->setRadius(radius); return iter->second; } diff --git a/src/client/houses.cpp b/src/client/houses.cpp index 8b08604c..118e1adb 100644 --- a/src/client/houses.cpp +++ b/src/client/houses.cpp @@ -64,7 +64,7 @@ void House::removeDoorById(uint32 doorId) { if(doorId >= m_lastDoorId) stdext::throw_exception(stdext::format("Failed to remove door of id %d (would overflow), max id: %d", - doorId, m_lastDoorId)); + doorId, m_lastDoorId)); m_doors[doorId] = nullptr; } diff --git a/src/client/towns.cpp b/src/client/towns.cpp index 7c979849..27dbffca 100644 --- a/src/client/towns.cpp +++ b/src/client/towns.cpp @@ -61,7 +61,7 @@ const TownPtr& TownManager::getTown(uint32 townId) const TownPtr& TownManager::getTownByName(std::string name) { auto it = std::find_if(m_towns.begin(), m_towns.end(), - [=] (const TownPtr& town) -> bool { return town->getName() == name; } ); + [=] (const TownPtr& town) -> bool { return town->getName() == name; } ); if(it != m_towns.end()) return *it; return m_nullTown; diff --git a/src/client/uiitem.cpp b/src/client/uiitem.cpp index 8afdf6e3..4c5c4524 100644 --- a/src/client/uiitem.cpp +++ b/src/client/uiitem.cpp @@ -63,8 +63,9 @@ void UIItem::drawSelf(Fw::DrawPane drawPane) g_painter->setColor(Color(231, 231, 231)); m_font->drawText(count, Rect(m_rect.topLeft(), m_rect.bottomRight() - Point(3, 0)), Fw::AlignBottomRight); } + if(m_showId) - m_font->drawText(stdext::to_string(m_item->getServerId()), m_rect, Fw::AlignBottomRight); + m_font->drawText(stdext::to_string(m_item->getServerId()), m_rect, Fw::AlignBottomRight); } drawBorder(m_rect); @@ -98,7 +99,7 @@ void UIItem::onStyleApply(const std::string& styleName, const OTMLNodePtr& style setItemVisible(node->value()); else if(node->tag() == "virtual") setVirtual(node->value()); - else if(node->tag() == "show-id") - m_showId = node->value(); + else if(node->tag() == "show-id") + m_showId = node->value(); } } diff --git a/src/framework/stdext/compiler.h b/src/framework/stdext/compiler.h index c947dc00..8e91ed20 100644 --- a/src/framework/stdext/compiler.h +++ b/src/framework/stdext/compiler.h @@ -55,11 +55,11 @@ /// NB: These are used when speed is need most; do not use in normal /// code, they may slow down stuff. #if defined(__clang__) || defined(__GNUC__) -#define likely(x) __builtin_expect(!!(x), 1) -#define unlikely(x) __builtin_expect(!!(x), 0) +#define likely(x) __builtin_expect(!!(x), 1) +#define unlikely(x) __builtin_expect(!!(x), 0) #else -#define likely(x) (x) -#define unlikely(x) (x) +#define likely(x) (x) +#define unlikely(x) (x) #endif #if !defined(_MSC_VER) && !defined(__GXX_EXPERIMENTAL_CXX0X__)