Fixing a use_after_move and a copy_instead_of_move
}
template <typename T>
-static void ptrAssign(T* ptr, T value)
+static void ptrAssign(T* ptr, const T& value)
{
if (ptr != nullptr) {
*ptr = value;
auto insertionPair = beenthere.insert(std::move(answer));
if (!insertionPair.second) {
brokeloop = true;
- LOG(prefix << qname << ": We have NS in cache for '" << subdomain << "' but part of LOOP (already seen " << answer.qname << ")! Trying less specific NS" << endl);
+ LOG(prefix << qname << ": We have NS in cache for '" << subdomain << "' but part of LOOP (already seen " << insertionPair.first->qname << ")! Trying less specific NS" << endl);
;
if (doLog())
for (set<GetBestNSAnswer>::const_iterator j = beenthere.begin(); j != beenthere.end(); ++j) {