reactos/subsys/system/explorer/taskbar
diff -u -r1.54 -r1.55
--- traynotify.cpp 28 Mar 2004 14:55:18 -0000 1.54
+++ traynotify.cpp 28 Mar 2004 22:17:48 -0000 1.55
@@ -234,11 +234,11 @@
NotifyIconConfig cfg;
- cfg._name = node["name"];
- cfg._tipText = node["text"];
- cfg._windowTitle = node["window"];
- cfg._modulePath = node["module"];
- const string& mode = node["show"];
+ cfg._name = node.get("name");
+ cfg._tipText = node.get("text");
+ cfg._windowTitle = node.get("window");
+ cfg._modulePath = node.get("module");
+ const string& mode = node.get("show");
if (mode == "show")
cfg._mode = NIM_SHOW;
reactos/subsys/system/explorer/utility
diff -u -r1.9 -r1.10
--- xmlstorage.h 28 Mar 2004 21:04:00 -0000 1.9
+++ xmlstorage.h 28 Mar 2004 22:17:49 -0000 1.10
@@ -331,7 +331,7 @@
}
/// read only access to an attribute
- String operator[](const String& attr_name) const
+ template<typename T> String get(const T& attr_name) const
{
AttributeMap::const_iterator found = _attributes.find(attr_name);
@@ -347,7 +347,7 @@
const XMLNode* node = find_first(name);
if (node)
- return (*node)[attr_name];
+ return node->get(attr_name);
else
return TEXT("");
}
@@ -366,26 +366,13 @@
}
#ifdef UNICODE
-#ifndef __GNUC__ // avoid GCC complaining about: "ISO C++ says that `String XMLStorage::XMLNode::operator[](const char *) const' and `String & XMLStorage::XMLNode::operator[](const String &)' are ambiguous even though the worst conversion for the former is better than the worst conversion for the latter
- /// read only access to an attribute
- String operator[](const char* attr_name) const
- {
- AttributeMap::const_iterator found = _attributes.find(attr_name);
-
- if (found != _attributes.end())
- return found->second;
- else
- return TEXT("");
- }
-#endif
-
/// convenient value access in children node
String value(const char* name, const char* attr_name) const
{
const XMLNode* node = find_first(name);
if (node)
- return (*node)[attr_name];
+ return node->get(attr_name);
else
return TEXT("");
}
@@ -468,7 +455,7 @@
for(Children::const_iterator it=_children.begin(); it!=_children.end(); ++it) {
const XMLNode& node = **it;
- if (node==name && node[attr_name]==attr_value)
+ if (node==name && node.get(attr_name)==attr_value)
return *it;
}
@@ -491,7 +478,7 @@
for(Children::const_iterator it=_children.begin(); it!=_children.end(); ++it) {
const XMLNode& node = **it;
- if (node==name && node[attr_name]==attr_value)
+ if (node==name && node.get(attr_name)==attr_value)
return *it;
}
@@ -646,7 +633,7 @@
/// attribute access
String& operator[](const String& attr_name) {return (*_cur)[attr_name];}
- String operator[](const String& attr_name) const {return (*_cur)[attr_name];}
+ template<typename T> String get(const T& attr_name) const {return (*_cur)[attr_name];}
/// insert children when building tree
void add_down(XMLNode* child)