removed dead code (SkinPage::FontInfo).

This commit is contained in:
rachytski 2012-11-05 20:11:16 +03:00 committed by Alex Zolotarev
parent 70c95034bc
commit be63171c2a
3 changed files with 0 additions and 48 deletions

View file

@ -31,7 +31,6 @@ namespace yg
struct Color;
struct GlyphKey;
class GlyphCache;
struct FontInfo;
class Skin
{
@ -120,8 +119,6 @@ namespace yg
void addClearPageFn(clearPageFn fn, int priority);
FontInfo const & getFont(int size) const;
shared_ptr<SkinPage> const & getPage(int i) const;
size_t getPagesCount() const;

View file

@ -15,41 +15,11 @@ namespace yg
{
typedef gl::Texture<DATA_TRAITS, true> TDynamicTexture;
ResourceStyle * FontInfo::fromID(uint32_t id, bool isMask) const
{
TChars::const_iterator it = m_chars.find(id);
if (it == m_chars.end())
{
if (m_invalidChar.first == 0)
{
it = m_chars.find(65533);
if (it == m_chars.end())
it = m_chars.find(32);
else
LOG(LINFO, ("initialized invalidChar from 65533"));
m_invalidChar = pair<ResourceStyle*, ResourceStyle*>(it->second.first.get(), it->second.second.get());
}
if (isMask)
return m_invalidChar.second;
else
return m_invalidChar.first;
}
else
if (isMask)
return it->second.second.get();
else
return it->second.first.get();
}
SkinPage::SkinPage()
: m_type(EStatic),
m_pipelineID(0)
{}
SkinPage::SkinPage(shared_ptr<ResourceManager> const & resourceManager,
char const * name,
uint8_t pipelineID)

View file

@ -23,18 +23,6 @@ namespace yg
class ResourceManager;
struct GlyphInfo;
struct FontInfo
{
int8_t m_fontSize;
typedef map<int32_t, pair<shared_ptr<GlyphStyle>, shared_ptr<GlyphStyle> > > TChars;
TChars m_chars;
mutable pair<ResourceStyle *, ResourceStyle *> m_invalidChar;
FontInfo() : m_invalidChar(static_cast<ResourceStyle *>(0), static_cast<ResourceStyle *>(0)) {}
ResourceStyle * fromID(uint32_t id, bool isMask = false) const;
};
class SkinPage
{
public:
@ -81,9 +69,6 @@ namespace yg
TUploadQueue m_uploadQueue;
typedef vector<FontInfo> TFonts;
TFonts m_fonts;
EType m_type;
uint32_t m_pipelineID;