Browse Source

fix member functions

master
roker 4 years ago
parent
commit
555c3acd88
  1. 11
      src/types.cc

11
src/types.cc

@ -96,7 +96,7 @@ namespace pEp
template<> template<>
bool StringPairList::empty() const bool StringPairList::empty() const
{ {
return value && value->value; return !(value && value->value);
} }
template<> template<>
@ -118,14 +118,19 @@ namespace pEp
template<> template<>
void StringPairList::push_back(::stringpair_t*&& sp) void StringPairList::push_back(::stringpair_t*&& sp)
{ {
stringpair_list_add(value, sp); auto last = stringpair_list_add(value, sp);
if(value==nullptr)
value = last;
sp = nullptr; sp = nullptr;
} }
template<> template<>
void StringPairList::push_back(StringPair&& sp) void StringPairList::push_back(StringPair&& sp)
{ {
stringpair_list_add(value, sp.move_out()); auto last = stringpair_list_add(value, sp.move_out());
if(value==nullptr)
value = last;
} }
template<> template<>

Loading…
Cancel
Save