From fc5f5d3ec27eaf7bc93d9a245daca45b5ef46e81 Mon Sep 17 00:00:00 2001 From: Jeremie Roy Date: Wed, 24 Apr 2013 12:15:40 +0200 Subject: [PATCH] convert static const to #define --- examples/common/font/text_buffer_manager.cpp | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/examples/common/font/text_buffer_manager.cpp b/examples/common/font/text_buffer_manager.cpp index ced0f4a97..4d0b9b13a 100644 --- a/examples/common/font/text_buffer_manager.cpp +++ b/examples/common/font/text_buffer_manager.cpp @@ -10,7 +10,8 @@ #include #include /* offsetof */ -const uint16_t MAX_TEXT_BUFFER_COUNT = 64; +#define MAX_TEXT_BUFFER_COUNT 64 +#define MAX_BUFFERED_CHARACTERS 8192 long int fsize(FILE* _file) { @@ -141,15 +142,13 @@ private: void appendGlyph(CodePoint_t _codePoint, const FontInfo& _font, const GlyphInfo& _glyphInfo); void verticalCenterLastLine(float _txtDecalY, float _top, float _bottom); uint32_t toABGR(uint32_t _rgba) -{ - return (((_rgba >> 0) & 0xff) << 24) | - (((_rgba >> 8) & 0xff) << 16) | - (((_rgba >> 16) & 0xff) << 8) | - (((_rgba >> 24) & 0xff) << 0); -} - - static const uint32_t MAX_BUFFERED_CHARACTERS = 8192; - + { + return (((_rgba >> 0) & 0xff) << 24) | + (((_rgba >> 8) & 0xff) << 16) | + (((_rgba >> 16) & 0xff) << 8) | + (((_rgba >> 24) & 0xff) << 0); + } + uint32_t m_styleFlags; // color states