[gnote] Replace std::string by Glib::ustring in xml



commit c00f1865bbd345f2884031c0f17edfd618761d70
Author: Aurimas Černius <aurisc4 gmail com>
Date:   Fri Jan 27 22:54:12 2017 +0200

    Replace std::string by Glib::ustring in xml

 src/sharp/xml.cpp |   12 ++++++------
 src/sharp/xml.hpp |   14 +++++++-------
 2 files changed, 13 insertions(+), 13 deletions(-)
---
diff --git a/src/sharp/xml.cpp b/src/sharp/xml.cpp
index c43d07b..d938683 100644
--- a/src/sharp/xml.cpp
+++ b/src/sharp/xml.cpp
@@ -1,7 +1,7 @@
 /*
  * gnote
  *
- * Copyright (C) 2012 Aurimas Cernius
+ * Copyright (C) 2012,2017 Aurimas Cernius
  * Copyright (C) 2009 Hubert Figuiere
  * 
  * Permission is hereby granted, free of charge, to any person obtaining a
@@ -69,8 +69,8 @@ namespace sharp {
   }
 
 
-  std::string xml_node_xpath_find_single(const xmlNodePtr node,
-                                         const char * xpath)
+  Glib::ustring xml_node_xpath_find_single(const xmlNodePtr node,
+                                           const char * xpath)
   {
     xmlNodePtr n = xml_node_xpath_find_single_node(node, xpath);
     if(!n) {
@@ -110,7 +110,7 @@ namespace sharp {
   }
 
 
-  std::string xml_node_content(xmlNodePtr node)
+  Glib::ustring xml_node_content(xmlNodePtr node)
   {
     if(!node) {
       return "";
@@ -126,8 +126,8 @@ namespace sharp {
   }
 
 
-  std::string xml_node_get_attribute(const xmlNodePtr node,
-                                     const char * attr_name)
+  Glib::ustring xml_node_get_attribute(const xmlNodePtr node,
+                                       const char * attr_name)
   {
     char *res = reinterpret_cast<char*>(xmlGetProp(node, reinterpret_cast<const xmlChar*>(attr_name)));
     return res ? res : "";
diff --git a/src/sharp/xml.hpp b/src/sharp/xml.hpp
index 4568ed9..55bff7b 100644
--- a/src/sharp/xml.hpp
+++ b/src/sharp/xml.hpp
@@ -1,7 +1,7 @@
 /*
  * gnote
  *
- * Copyright (C) 2012 Aurimas Cernius
+ * Copyright (C) 2012,2017 Aurimas Cernius
  * Copyright (C) 2009 Hubert Figuiere
  * 
  * Permission is hereby granted, free of charge, to any person obtaining a
@@ -29,9 +29,9 @@
 #ifndef __SHARP_XML_HPP_
 #define __SHARP_XML_HPP_
 
-#include <string>
 #include <vector>
 
+#include <glibmm/ustring.h>
 #include <libxml/tree.h>
 
 namespace sharp {
@@ -42,16 +42,16 @@ namespace sharp {
   XmlNodeSet xml_node_xpath_find(const xmlNodePtr node,
                                  const char * xpath);
 
-  std::string xml_node_xpath_find_single(const xmlNodePtr node,
-                                         const char * xpath);
+  Glib::ustring xml_node_xpath_find_single(const xmlNodePtr node,
+                                           const char * xpath);
 
   xmlNodePtr xml_node_xpath_find_single_node(const xmlNodePtr node,
                                              const char * xpath);
 
-  std::string xml_node_content(xmlNodePtr node);
+  Glib::ustring xml_node_content(xmlNodePtr node);
 
-  std::string xml_node_get_attribute(const xmlNodePtr node,
-                                     const char * attr_name);
+  Glib::ustring xml_node_get_attribute(const xmlNodePtr node,
+                                       const char * attr_name);
 
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]