summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2019-08-03 18:12:55 +0200
committerDavid Tardon <dtardon@redhat.com>2019-08-03 18:20:24 +0200
commitdfed7b1e459f3bde8dcbb997e5664deeff9e338d (patch)
treefdc40df3ab6b03b33f639cff01286caff31bc357
parent95ccb8facab44862b12f69eac9b52ede02a1a55d (diff)
WaE: implicitly-declared VSDName::operator= is deprecated
Change-Id: Ic99122062fc314a3ae6e3b904e4415f8b276f646
-rw-r--r--src/lib/Makefile.am1
-rw-r--r--src/lib/VSDTypes.cpp27
-rw-r--r--src/lib/VSDTypes.h1
3 files changed, 29 insertions, 0 deletions
diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am
index d8a798e..e6212e8 100644
--- a/src/lib/Makefile.am
+++ b/src/lib/Makefile.am
@@ -65,6 +65,7 @@ libvisio_internal_la_SOURCES = \
VSDStyles.h \
VSDStylesCollector.cpp \
VSDStylesCollector.h \
+ VSDTypes.cpp \
VSDTypes.h \
VSDXMLHelper.cpp \
VSDXMLHelper.h \
diff --git a/src/lib/VSDTypes.cpp b/src/lib/VSDTypes.cpp
new file mode 100644
index 0000000..70b9890
--- /dev/null
+++ b/src/lib/VSDTypes.cpp
@@ -0,0 +1,27 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/*
+ * This file is part of the libvisio project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "VSDTypes.h"
+
+namespace libvisio
+{
+
+const VSDName &VSDName::operator=(const VSDName &name)
+{
+ if (this != &name)
+ {
+ m_data = name.m_data;
+ m_format = name.m_format;
+ }
+ return *this;
+}
+
+} // namespace libvisio
+
+/* vim:set shiftwidth=2 softtabstop=2 expandtab: */
diff --git a/src/lib/VSDTypes.h b/src/lib/VSDTypes.h
index fbcb65d..7e75ee4 100644
--- a/src/lib/VSDTypes.h
+++ b/src/lib/VSDTypes.h
@@ -183,6 +183,7 @@ public:
m_format(format) {}
VSDName() : m_data(), m_format(VSD_TEXT_ANSI) {}
VSDName(const VSDName &name) : m_data(name.m_data), m_format(name.m_format) {}
+ const VSDName &operator=(const VSDName &name);
bool empty() const
{
return !m_data.size();