summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-02-08 18:05:46 +0300
committerAndrei Karas <akaras@inbox.ru>2016-02-08 18:05:46 +0300
commit467a5c03ccb5ea2d1977bd84adcab69eefb4e051 (patch)
treea43709e19c87776f2db42304b6bd7f0c13721361 /src
parent9547e64f0f25bb9f50cac9ba9dc035fbc051d4c2 (diff)
downloadplus-467a5c03ccb5ea2d1977bd84adcab69eefb4e051.tar.gz
plus-467a5c03ccb5ea2d1977bd84adcab69eefb4e051.tar.bz2
plus-467a5c03ccb5ea2d1977bd84adcab69eefb4e051.tar.xz
plus-467a5c03ccb5ea2d1977bd84adcab69eefb4e051.zip
Add missing operator= in classes with copy constructors.
Diffstat (limited to 'src')
-rw-r--r--src/gui/fonts/textchunksmall.cpp7
-rw-r--r--src/gui/fonts/textchunksmall.h2
-rw-r--r--src/net/serverinfo.h18
-rw-r--r--src/vector.h7
4 files changed, 33 insertions, 1 deletions
diff --git a/src/gui/fonts/textchunksmall.cpp b/src/gui/fonts/textchunksmall.cpp
index afb66dacc..f8c84fdb8 100644
--- a/src/gui/fonts/textchunksmall.cpp
+++ b/src/gui/fonts/textchunksmall.cpp
@@ -40,6 +40,13 @@ TextChunkSmall::TextChunkSmall(const TextChunkSmall &old) :
{
}
+void TextChunkSmall::operator=(const TextChunkSmall &chunk)
+{
+ text = chunk.text;
+ color = chunk.color;
+ color2 = chunk.color2;
+}
+
bool TextChunkSmall::operator==(const TextChunkSmall &chunk) const
{
return (chunk.text == text && chunk.color == color
diff --git a/src/gui/fonts/textchunksmall.h b/src/gui/fonts/textchunksmall.h
index da5b83e6a..75c4e6dd7 100644
--- a/src/gui/fonts/textchunksmall.h
+++ b/src/gui/fonts/textchunksmall.h
@@ -38,7 +38,7 @@ class TextChunkSmall final
bool operator==(const TextChunkSmall &restrict chunk) const restrict2;
bool operator<(const TextChunkSmall &restrict chunk) const restrict2;
-
+ void operator=(const TextChunkSmall &restrict chunk) restrict2;
std::string text;
Color color;
Color color2;
diff --git a/src/net/serverinfo.h b/src/net/serverinfo.h
index 45f042b0e..7df9e0066 100644
--- a/src/net/serverinfo.h
+++ b/src/net/serverinfo.h
@@ -89,6 +89,24 @@ class ServerInfo final
version.second = info.version.second;
}
+ void operator=(const ServerInfo &info)
+ {
+ type = info.type;
+ name = info.name;
+ hostname = info.hostname;
+ althostname = info.althostname;
+ description = info.description;
+ registerUrl = info.registerUrl;
+ onlineListUrl = info.onlineListUrl;
+ supportUrl = info.supportUrl;
+ updateMirrors = info.updateMirrors;
+ port = info.port;
+ save = info.save;
+ persistentIp = info.persistentIp;
+ version.first = info.version.first;
+ version.second = info.version.second;
+ }
+
bool isValid() const A_WARN_UNUSED
{
return !(hostname.empty()
diff --git a/src/vector.h b/src/vector.h
index 1f998b85e..9f3ca47c0 100644
--- a/src/vector.h
+++ b/src/vector.h
@@ -72,6 +72,13 @@ class Vector final
return x == 0.0F && y == 0.0F && z == 0.0F;
}
+ void operator=(const Vector &v)
+ {
+ x = v.x;
+ y = v.y;
+ z = v.z;
+ }
+
/**
* Scale vector operator.
*/