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



commit 50a622ea69c06cf4dc71a1beb42037c54177b7c8
Author: Aurimas Černius <aurisc4 gmail com>
Date:   Fri Jan 27 22:34:16 2017 +0200

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

 src/gnote.cpp              |    2 +-
 src/sharp/streamreader.cpp |    5 +++--
 src/sharp/streamreader.hpp |    9 +++++----
 3 files changed, 9 insertions(+), 7 deletions(-)
---
diff --git a/src/gnote.cpp b/src/gnote.cpp
index 7202631..bf43272 100644
--- a/src/gnote.cpp
+++ b/src/gnote.cpp
@@ -676,7 +676,7 @@ namespace gnote {
           sr.init(m_open_external_note_path);
           if (sr.file()) {
             std::string noteTitle;
-            std::string noteXml;
+            Glib::ustring noteXml;
             sr.read_to_end (noteXml);
 
             // Make sure noteXml is parseable
diff --git a/src/sharp/streamreader.cpp b/src/sharp/streamreader.cpp
index 86d2077..331c074 100644
--- a/src/sharp/streamreader.cpp
+++ b/src/sharp/streamreader.cpp
@@ -1,6 +1,7 @@
 /*
  * gnote
  *
+ * Copyright (C) 2017 Aurimas Cernius
  * Copyright (C) 2009 Hubert Figuiere
  * 
  * Permission is hereby granted, free of charge, to any person obtaining a
@@ -46,13 +47,13 @@ StreamReader::~StreamReader()
   }
 }
 
-void StreamReader::init(const std::string & filename)
+void StreamReader::init(const Glib::ustring & filename)
 {
   m_file = fopen(filename.c_str(), "rb");
 }
 
 
-void StreamReader::read_to_end(std::string & text)
+void StreamReader::read_to_end(Glib::ustring & text)
 {
   DBG_ASSERT(m_file, "file is NULL");
 
diff --git a/src/sharp/streamreader.hpp b/src/sharp/streamreader.hpp
index eee1b97..da18e92 100644
--- a/src/sharp/streamreader.hpp
+++ b/src/sharp/streamreader.hpp
@@ -1,6 +1,7 @@
 /*
  * gnote
  *
+ * Copyright (C) 2017 Aurimas Cernius
  * Copyright (C) 2009 Hubert Figuiere
  * 
  * Permission is hereby granted, free of charge, to any person obtaining a
@@ -29,10 +30,10 @@
 
 #include <stdio.h>
 
-#include <string>
-
 #include <libxml/tree.h>
 
+#include <glibmm/ustring.h>
+
 namespace sharp {
 
 
@@ -43,14 +44,14 @@ public:
   StreamReader();
   ~StreamReader();
 
-  void init(const std::string &);
+  void init(const Glib::ustring &);
 
   FILE * file()
     {
       return m_file;
     }
 
-  void read_to_end(std::string &);
+  void read_to_end(Glib::ustring &);
 
   void close();
 private:


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