Replaced some tabs with spaces

This commit is contained in:
TheSumm 2015-12-11 01:51:55 +01:00
parent 80184a1249
commit 37f563d3d5
5 changed files with 11 additions and 10 deletions

View File

@ -394,7 +394,7 @@ SpawnPtr CreatureManager::addSpawn(const Position& centerPos, int radius)
auto iter = m_spawns.find(centerPos); auto iter = m_spawns.find(centerPos);
if(iter != m_spawns.end()) { if(iter != m_spawns.end()) {
if(iter->second->getRadius() != radius) if(iter->second->getRadius() != radius)
iter->second->setRadius(radius); iter->second->setRadius(radius);
return iter->second; return iter->second;
} }

View File

@ -64,7 +64,7 @@ void House::removeDoorById(uint32 doorId)
{ {
if(doorId >= m_lastDoorId) if(doorId >= m_lastDoorId)
stdext::throw_exception(stdext::format("Failed to remove door of id %d (would overflow), max id: %d", 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; m_doors[doorId] = nullptr;
} }

View File

@ -61,7 +61,7 @@ const TownPtr& TownManager::getTown(uint32 townId)
const TownPtr& TownManager::getTownByName(std::string name) const TownPtr& TownManager::getTownByName(std::string name)
{ {
auto it = std::find_if(m_towns.begin(), m_towns.end(), 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()) if(it != m_towns.end())
return *it; return *it;
return m_nullTown; return m_nullTown;

View File

@ -63,8 +63,9 @@ void UIItem::drawSelf(Fw::DrawPane drawPane)
g_painter->setColor(Color(231, 231, 231)); g_painter->setColor(Color(231, 231, 231));
m_font->drawText(count, Rect(m_rect.topLeft(), m_rect.bottomRight() - Point(3, 0)), Fw::AlignBottomRight); m_font->drawText(count, Rect(m_rect.topLeft(), m_rect.bottomRight() - Point(3, 0)), Fw::AlignBottomRight);
} }
if(m_showId) 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); drawBorder(m_rect);
@ -98,7 +99,7 @@ void UIItem::onStyleApply(const std::string& styleName, const OTMLNodePtr& style
setItemVisible(node->value<bool>()); setItemVisible(node->value<bool>());
else if(node->tag() == "virtual") else if(node->tag() == "virtual")
setVirtual(node->value<bool>()); setVirtual(node->value<bool>());
else if(node->tag() == "show-id") else if(node->tag() == "show-id")
m_showId = node->value<bool>(); m_showId = node->value<bool>();
} }
} }

View File

@ -55,11 +55,11 @@
/// NB: These are used when speed is need most; do not use in normal /// NB: These are used when speed is need most; do not use in normal
/// code, they may slow down stuff. /// code, they may slow down stuff.
#if defined(__clang__) || defined(__GNUC__) #if defined(__clang__) || defined(__GNUC__)
#define likely(x) __builtin_expect(!!(x), 1) #define likely(x) __builtin_expect(!!(x), 1)
#define unlikely(x) __builtin_expect(!!(x), 0) #define unlikely(x) __builtin_expect(!!(x), 0)
#else #else
#define likely(x) (x) #define likely(x) (x)
#define unlikely(x) (x) #define unlikely(x) (x)
#endif #endif
#if !defined(_MSC_VER) && !defined(__GXX_EXPERIMENTAL_CXX0X__) #if !defined(_MSC_VER) && !defined(__GXX_EXPERIMENTAL_CXX0X__)