mirror of
https://github.com/edubart/otclient.git
synced 2025-10-20 06:23:26 +02:00
Compile with clang and add cotire
* Add cotire cmake module to speedup compilation https://github.com/sakra/cotire * Fix clang error and warnings * Rename Font to BitmapFont to fix conflict with Xlib.g Font typedef * Remove legacy PCH support * Improve Position hash
This commit is contained in:
@@ -335,16 +335,15 @@ void UIManager::importStyleFromOTML(const OTMLNodePtr& styleNode)
|
||||
styleNode->writeAt("__unique", true);
|
||||
}
|
||||
|
||||
// TODO: styles must be searched by widget scopes, in that way this warning could be fixed
|
||||
// this warning is disabled because many ppl was complening about it
|
||||
/*
|
||||
auto it = m_styles.find(name);
|
||||
if(it != m_styles.end())
|
||||
g_logger.warning("style '%s' is being redefined", name);
|
||||
*/
|
||||
// Warn about redefined styles
|
||||
if(!g_app->isRunning() && !unique) {
|
||||
auto it = m_styles.find(name);
|
||||
if(it != m_styles.end())
|
||||
g_logger.warning(stdext::format("style '%s' is being redefined", name));
|
||||
}
|
||||
|
||||
OTMLNodePtr oldStyle = m_styles[name];
|
||||
if(!oldStyle || oldStyle->valueAt("__unique", false) || unique) {
|
||||
if(!oldStyle || !oldStyle->valueAt("__unique", false) || unique) {
|
||||
OTMLNodePtr originalStyle = getStyle(base);
|
||||
if(!originalStyle)
|
||||
stdext::throw_exception(stdext::format("base style '%s', is not defined", base));
|
||||
|
@@ -21,7 +21,7 @@
|
||||
*/
|
||||
|
||||
#include "uitextedit.h"
|
||||
#include <framework/graphics/font.h>
|
||||
#include <framework/graphics/bitmapfont.h>
|
||||
#include <framework/graphics/graphics.h>
|
||||
#include <framework/platform/platformwindow.h>
|
||||
#include <framework/core/clock.h>
|
||||
|
@@ -1208,7 +1208,7 @@ void UIWidget::updateState(Fw::WidgetState state)
|
||||
newStatus = false;
|
||||
break;
|
||||
}
|
||||
} while(widget = parent);
|
||||
} while((widget = parent));
|
||||
|
||||
updateChildren = newStatus != oldStatus;
|
||||
break;
|
||||
@@ -1237,7 +1237,7 @@ void UIWidget::updateState(Fw::WidgetState state)
|
||||
enabled = false;
|
||||
break;
|
||||
}
|
||||
} while(widget = widget->getParent());
|
||||
} while((widget = widget->getParent()));
|
||||
newStatus = !enabled;
|
||||
updateChildren = newStatus != oldStatus;
|
||||
break;
|
||||
|
@@ -27,7 +27,7 @@
|
||||
#include <framework/luascript/luaobject.h>
|
||||
#include <framework/graphics/declarations.h>
|
||||
#include <framework/otml/otmlnode.h>
|
||||
#include <framework/graphics/font.h>
|
||||
#include <framework/graphics/bitmapfont.h>
|
||||
#include <framework/graphics/coordsbuffer.h>
|
||||
#include <framework/core/timer.h>
|
||||
|
||||
@@ -465,7 +465,7 @@ protected:
|
||||
Point m_textOffset;
|
||||
Boolean<false> m_textWrap;
|
||||
Boolean<false> m_textAutoResize;
|
||||
FontPtr m_font;
|
||||
BitmapFontPtr m_font;
|
||||
|
||||
public:
|
||||
void resizeToText() { setSize(getTextSize()); }
|
||||
|
Reference in New Issue
Block a user