From: Kees Monshouwer Date: Thu, 14 Jul 2022 07:46:09 +0000 (+0200) Subject: auth: g++ 4.8 is no longer an issue X-Git-Tag: auth-4.8.0-alpha0~7^2~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=94452eb3a094c01539fc0b2ceb6514a89959bede;p=thirdparty%2Fpdns.git auth: g++ 4.8 is no longer an issue --- diff --git a/modules/lmdbbackend/lmdbbackend.cc b/modules/lmdbbackend/lmdbbackend.cc index 1f200bc24c..54495b63c9 100644 --- a/modules/lmdbbackend/lmdbbackend.cc +++ b/modules/lmdbbackend/lmdbbackend.cc @@ -157,12 +157,12 @@ namespace serialization template void save(Archive& ar, const DNSName& g, const unsigned int version) { - if (!g.empty()) { - std::string tmp = g.toDNSStringLC(); // g++ 4.8 woes - ar& tmp; - } - else + if (g.empty()) { ar& std::string(); + } + else { + ar& g.toDNSStringLC(); + } } template @@ -170,17 +170,18 @@ namespace serialization { string tmp; ar& tmp; - if (tmp.empty()) + if (tmp.empty()) { g = DNSName(); - else + } + else { g = DNSName(tmp.c_str(), tmp.size(), 0, false); + } } template void save(Archive& ar, const QType& g, const unsigned int version) { - uint16_t tmp = g.getCode(); // g++ 4.8 woes - ar& tmp; + ar& g.getCode(); } template