mirror of
https://github.com/edubart/otclient.git
synced 2025-12-26 17:57:11 +01:00
Rework stdext classes
Implement new classes: * stdext::any => ligher replacement for boost::any * stdext::packed_any => like any but optimized to use less memory * stdext::shared_object => ligher replacement for std::shared_ptr * stdext::shared_object_ptr => replacement for boost::intrusive_ptr * stdext::fast_storage => for storing dynamic data * stdext::packed_storage => same but with less memory * stdext::packed_vector => std::vector with less memory Compiling should be a little faster now because global boost including is not needed anymore
This commit is contained in:
@@ -321,8 +321,7 @@ bool UIManager::importStyle(const std::string& file)
|
||||
void UIManager::importStyleFromOTML(const OTMLNodePtr& styleNode)
|
||||
{
|
||||
std::string tag = styleNode->tag();
|
||||
std::vector<std::string> split;
|
||||
boost::split(split, tag, boost::is_any_of(std::string("<")));
|
||||
std::vector<std::string> split = stdext::split(tag, "<");
|
||||
if(split.size() != 2)
|
||||
throw OTMLException(styleNode, "not a valid style declaration");
|
||||
|
||||
@@ -330,8 +329,8 @@ void UIManager::importStyleFromOTML(const OTMLNodePtr& styleNode)
|
||||
std::string base = split[1];
|
||||
bool unique = false;
|
||||
|
||||
boost::trim(name);
|
||||
boost::trim(base);
|
||||
stdext::trim(name);
|
||||
stdext::trim(base);
|
||||
|
||||
if(name[0] == '#') {
|
||||
name = name.substr(1);
|
||||
@@ -367,7 +366,7 @@ OTMLNodePtr UIManager::getStyle(const std::string& styleName)
|
||||
return m_styles[styleName];
|
||||
|
||||
// styles starting with UI are automatically defined
|
||||
if(boost::starts_with(styleName, "UI")) {
|
||||
if(stdext::starts_with(styleName, "UI")) {
|
||||
OTMLNodePtr node = OTMLNode::create(styleName);
|
||||
node->writeAt("__class", styleName);
|
||||
m_styles[styleName] = node;
|
||||
|
||||
Reference in New Issue
Block a user