fix cut & paste errors, so the compiler is happy again. :)

master
roker 2 years ago
parent 9f2d01a2bf
commit 8dd301c251

@ -13,30 +13,31 @@ namespace pEp
}
template<>
pEp_identity* identity_list::* const ListWrapper<identity_list*, const char*>::Value = &identity_list::ident;
::pEp_identity* identity_list::* const ListWrapper<::identity_list*, ::pEp_identity*>::Value
= &identity_list::ident;
template<>
int identity_list::size() const
int IdentityList::size() const
{
return identity_list_length(value);
}
// faster than .size()==0 because it's not necessary to iterate throgh the whole list
template<>
bool identity_list::empty() const
bool IdentityList::empty() const
{
return !(value && value->ident);
}
template<>
void identity_list::clear()
void IdentityList::clear()
{
free_identity_list(value);
value = nullptr;
}
template<>
void identity_list::push_back(pEp_identity*&& id)
void IdentityList::push_back(pEp_identity*&& id)
{
auto last = identity_list_add(value, id);
if(value==nullptr)
@ -46,7 +47,7 @@ namespace pEp
template<>
ListWrapper<::identity_list*, pEp_identity*>::ListWrapper(const std::initializer_list<Wrapper<pEp_identity*>>& il)
: identity_list{}
: Base{}
{
::identity_list* last = nullptr;
for(const Wrapper<pEp_identity*>& id : il)

@ -21,7 +21,7 @@ namespace pEp
};
using Identity = Wrapper<::pEp_identity*>;
using IdentityList = ListWrapper<::pEp_identity_list*, ::pEp_identity*>;
using IdentityList = ListWrapper<::identity_list*, ::pEp_identity*>;
using StringPair = Wrapper<::stringpair_t*>;
using StringPairList = ListWrapper<::stringpair_list_t*, ::stringpair_t*>;

Loading…
Cancel
Save