// For conditions of distribution and use, see copyright notice in irrlicht.h\r
\r
#include "CGUIFont.h"\r
-#ifdef _IRR_COMPILE_WITH_GUI_\r
\r
#include "os.h"\r
#include "coreutil.h"\r
#include "IGUIEnvironment.h"\r
-#include "IXMLReader.h"\r
#include "IReadFile.h"\r
#include "IVideoDriver.h"\r
#include "IGUISpriteBank.h"\r
}\r
\r
\r
+#if 0\r
//! loads a font file from xml\r
bool CGUIFont::load(io::IXMLReader* xml, const io::path& directory)\r
{\r
}\r
rectangle.LowerRightCorner.Y = val;\r
\r
- CharacterMap.insert(ch,Areas.size());\r
+ CharacterMap.emplace(ch, Areas.size());\r
\r
// make frame\r
f.rectNumber = SpriteBank->getPositions().size();\r
\r
return true;\r
}\r
+#endif\r
\r
\r
void CGUIFont::setMaxHeight()\r
Areas.push_back(a);\r
// map letter to character\r
wchar_t ch = (wchar_t)(lowerRightPositions + 32);\r
- CharacterMap.set(ch, lowerRightPositions);\r
+ CharacterMap[ch] = lowerRightPositions;\r
\r
++lowerRightPositions;\r
}\r
\r
s32 CGUIFont::getAreaFromCharacter(const wchar_t c) const\r
{\r
- core::map<wchar_t, s32>::Node* n = CharacterMap.find(c);\r
- if (n)\r
- return n->getValue();\r
+ auto n = CharacterMap.find(c);\r
+ if (n != CharacterMap.end())\r
+ return n->second;\r
else\r
return WrongCharacter;\r
}\r
\r
} // end namespace gui\r
} // end namespace irr\r
-\r
-#endif // _IRR_COMPILE_WITH_GUI_\r
-\r