[gnote] Remove use of boost::noncopyable
- From: Aurimas Černius <aurimasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnote] Remove use of boost::noncopyable
- Date: Sat, 28 Jan 2017 16:51:09 +0000 (UTC)
commit fc39dfd72fda3985c91aa54af2bac53c2f745903
Author: Aurimas Černius <aurisc4 gmail com>
Date: Sat Jan 28 18:17:42 2017 +0200
Remove use of boost::noncopyable
src/Makefile.am | 1 +
src/noncopyable.hpp | 43 +++++++++++++++++++++++++++++++++++++++++++
src/sharp/xmlreader.hpp | 5 +++--
src/sharp/xmlwriter.hpp | 6 +++---
src/undo.hpp | 7 +++----
5 files changed, 53 insertions(+), 9 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index dc3a52c..7c00646 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -107,6 +107,7 @@ libgnote_la_SOURCES = \
mainwindow.hpp mainwindow.cpp \
mainwindowaction.hpp mainwindowaction.cpp \
mainwindowembeds.hpp mainwindowembeds.cpp \
+ noncopyable.hpp \
noteaddin.hpp noteaddin.cpp \
notebase.hpp notebase.cpp \
notebuffer.hpp notebuffer.cpp \
diff --git a/src/noncopyable.hpp b/src/noncopyable.hpp
new file mode 100644
index 0000000..d1b6d76
--- /dev/null
+++ b/src/noncopyable.hpp
@@ -0,0 +1,43 @@
+/*
+ * gnote
+ *
+ * Copyright (C) 2017 Aurimas Cernius
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+
+#ifndef __NONCOPYABLE_HPP__
+#define __NONCOPYABLE_HPP__
+
+namespace gnote
+{
+
+class NonCopyable
+{
+public:
+ NonCopyable() {}
+ NonCopyable(const NonCopyable &) = delete;
+ const NonCopyable & operator=(const NonCopyable &) = delete;
+};
+
+}
+
+#endif
+
diff --git a/src/sharp/xmlreader.hpp b/src/sharp/xmlreader.hpp
index a423fa2..d4e6bd6 100644
--- a/src/sharp/xmlreader.hpp
+++ b/src/sharp/xmlreader.hpp
@@ -29,14 +29,15 @@
#ifndef __SHARP_XMLREADER_HPP_
#define __SHARP_XMLREADER_HPP_
-#include <boost/noncopyable.hpp>
#include <glibmm/ustring.h>
#include <libxml/xmlreader.h>
+#include "noncopyable.hpp"
+
namespace sharp {
class XmlReader
- : public boost::noncopyable
+ : public gnote::NonCopyable
{
public:
/** Create a XmlReader to read from a buffer */
diff --git a/src/sharp/xmlwriter.hpp b/src/sharp/xmlwriter.hpp
index fd5929e..b78f37a 100644
--- a/src/sharp/xmlwriter.hpp
+++ b/src/sharp/xmlwriter.hpp
@@ -30,12 +30,12 @@
#define __SHARP_XMLWRITER_HPP_
-#include <boost/noncopyable.hpp>
-
#include <glib.h>
#include <glibmm/ustring.h>
#include <libxml/xmlwriter.h>
+#include "noncopyable.hpp"
+
namespace sharp {
@@ -47,7 +47,7 @@ namespace sharp {
}
class XmlWriter
- : public boost::noncopyable
+ : public gnote::NonCopyable
{
public:
XmlWriter();
diff --git a/src/undo.hpp b/src/undo.hpp
index 59650e0..3fc1565 100644
--- a/src/undo.hpp
+++ b/src/undo.hpp
@@ -1,7 +1,7 @@
/*
* gnote
*
- * Copyright (C) 2013,2016 Aurimas Cernius
+ * Copyright (C) 2013,2016-2017 Aurimas Cernius
* Copyright (C) 2009 Hubert Figuiere
*
* This program is free software: you can redistribute it and/or modify
@@ -27,14 +27,13 @@
#include <string>
#include <stack>
-#include <boost/noncopyable.hpp>
-
#include <sigc++/signal.h>
#include <gtkmm/textbuffer.h>
#include <gtkmm/texttag.h>
#include <gtkmm/textiter.h>
#include "base/macros.hpp"
+#include "noncopyable.hpp"
#include "notebuffer.hpp"
#include "utils.hpp"
@@ -220,7 +219,7 @@ private:
};
class UndoManager
- : public boost::noncopyable
+ : public gnote::NonCopyable
{
public:
/** the buffer it NOT owned by the UndoManager
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]