summaryrefslogtreecommitdiff
path: root/src/versionstr.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2018-06-07 19:14:37 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2018-06-07 19:20:09 +0200
commit33fbebb84ca2d179342c6660a557ffe35d2473e4 (patch)
treeed66f5373e612b972493a293a74576f2e1c309b1 /src/versionstr.cc
parent93fe142f21e501a9ff12432d35fbf89b87135f9c (diff)
Move default initialisation to constructor.
Diffstat (limited to 'src/versionstr.cc')
-rw-r--r--src/versionstr.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/versionstr.cc b/src/versionstr.cc
index be6913b..8c6c66f 100644
--- a/src/versionstr.cc
+++ b/src/versionstr.cc
@@ -46,6 +46,7 @@
VersionStr::VersionStr(const std::string& v)
{
+ version = {{0, 0, 0}};
set(v);
}
@@ -66,7 +67,7 @@ void VersionStr::set(const std::string& v)
{
if(idx > 2)
{
- version = {0, 0, 0};
+ version = {{0, 0, 0}};
ERR(version, "Version string is too long.");
return;
}
@@ -80,14 +81,14 @@ void VersionStr::set(const std::string& v)
}
else
{
- version = {0, 0, 0};
+ version = {{0, 0, 0}};
ERR(version, "Version string contains illegal character.");
return;
}
}
if(idx > 2)
{
- version = {0, 0, 0};
+ version = {{0, 0, 0}};
ERR(version, "Version string is too long.");
return;
}