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



commit 41cd1a55780eea41578869039356da11bee32f1e
Author: Aurimas Černius <aurisc4 gmail com>
Date:   Fri Jan 27 21:37:51 2017 +0200

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

 src/sharp/dynamicmodule.cpp |   11 ++++-------
 src/sharp/dynamicmodule.hpp |    7 ++++---
 2 files changed, 8 insertions(+), 10 deletions(-)
---
diff --git a/src/sharp/dynamicmodule.cpp b/src/sharp/dynamicmodule.cpp
index e9ac08e..d604d8c 100644
--- a/src/sharp/dynamicmodule.cpp
+++ b/src/sharp/dynamicmodule.cpp
@@ -1,7 +1,7 @@
 /*
  * gnote
  *
- * Copyright (C) 2013 Aurimas Cernius
+ * Copyright (C) 2013,2017 Aurimas Cernius
  * Copyright (C) 2009 Hubert Figuiere
  * 
  * Permission is hereby granted, free of charge, to any person obtaining a
@@ -51,8 +51,7 @@ namespace sharp {
 
   IfaceFactoryBase * DynamicModule::query_interface(const char * intf) const
   {
-    std::map<std::string, IfaceFactoryBase *>::const_iterator iter;
-    iter = m_interfaces.find(intf);
+    auto iter = m_interfaces.find(intf);
     if(iter == m_interfaces.end()) {
       return NULL;
     }
@@ -62,16 +61,14 @@ namespace sharp {
 
   bool DynamicModule::has_interface(const char * intf) const
   {
-    std::map<std::string, IfaceFactoryBase *>::const_iterator iter;
-    iter = m_interfaces.find(intf);
+    auto iter = m_interfaces.find(intf);
     return (iter != m_interfaces.end());
   }
 
 
   void DynamicModule::add(const char * iface, IfaceFactoryBase* mod)
   {
-    std::map<std::string, IfaceFactoryBase *>::iterator iter;
-    iter = m_interfaces.find(iface);
+    auto iter = m_interfaces.find(iface);
     if(iter == m_interfaces.end()) {
       m_interfaces.insert(std::make_pair(iface, mod));
     }
diff --git a/src/sharp/dynamicmodule.hpp b/src/sharp/dynamicmodule.hpp
index c8c8c6b..e3d6218 100644
--- a/src/sharp/dynamicmodule.hpp
+++ b/src/sharp/dynamicmodule.hpp
@@ -1,7 +1,7 @@
 /*
  * gnote
  *
- * Copyright (C) 2010,2013 Aurimas Cernius
+ * Copyright (C) 2010,2013,2017 Aurimas Cernius
  * Copyright (C) 2009 Hubert Figuiere
  * 
  * Permission is hereby granted, free of charge, to any person obtaining a
@@ -30,7 +30,8 @@
 #define __SHARP_DYNAMICMODULE_HPP_
 
 #include <map>
-#include <string>
+
+#include <glibmm/ustring.h>
 
 
 namespace sharp {
@@ -80,7 +81,7 @@ protected:
   
 private:
   bool m_enabled;
-  std::map<std::string, IfaceFactoryBase *> m_interfaces;
+  std::map<Glib::ustring, IfaceFactoryBase *> m_interfaces;
 };
 
 


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