Browse Source

okay, ListWrapper<bloblist_t*, void> is a full specialization, so its members don't need "template<>". Clang++ did not tell me that, g++ did. But still bizarre somehow...

master
roker 4 years ago
parent
commit
2e1241bb5f
  1. 14
      src/bloblist.cc

14
src/bloblist.cc

@ -11,32 +11,30 @@ namespace pEp
} }
template<> // template<>
int BlobList::size() const int BlobList::size() const
{ {
return bloblist_length(value); return bloblist_length(value);
} }
// faster than .size()==0 because it's not necessary to iterate throgh the whole list // faster than .size()==0 because it's not necessary to iterate throgh the whole list
template<> // template<>
bool BlobList::empty() const bool BlobList::empty() const
{ {
return !(value && value->value); return !(value && value->value);
} }
template<> // template<>
void BlobList::clear() void BlobList::clear()
{ {
free_bloblist(value); free_bloblist(value);
value = nullptr; value = nullptr;
} }
template<> // template<>
void BlobList::push_back(const char*&& s) void BlobList::push_back(Blob&& s)
{ {
auto last = stringlist_add(value, s); // TODO
if(value==nullptr)
value = last;
} }
//////////////// ////////////////

Loading…
Cancel
Save