cpp: Make GpgME::Data::toKeys really const
* lang/cpp/src/data.cpp (GpgME::Data::toKeys): Rewind afterards. -- This fixes unexpected behavior that the seek pointer is changed after calling the const toKeys.
This commit is contained in:
parent
4c49417cc0
commit
6175025c82
@ -256,6 +256,8 @@ std::vector<GpgME::Key> GpgME::Data::toKeys(Protocol proto) const
|
||||
while (!gpgme_op_keylist_next (ctx->impl()->ctx, &key)) {
|
||||
ret.push_back(GpgME::Key(key, false));
|
||||
}
|
||||
gpgme_data_seek (d->data, 0, SEEK_SET);
|
||||
|
||||
delete ctx;
|
||||
return ret;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user