From f00cf4560bb38df429ef711d15dbbeccaf5699d0 Mon Sep 17 00:00:00 2001 From: Alexis Hildebrandt Date: Tue, 18 Apr 2023 11:31:50 +0200 Subject: gpgme: Remove obsoleted rewind wrapper function kudos to @spacefrogg --- src/gpgme.cc | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/gpgme.cc b/src/gpgme.cc index 0358f44d..15a40405 100644 --- a/src/gpgme.cc +++ b/src/gpgme.cc @@ -160,10 +160,6 @@ static inline void init_lib() { throw_(runtime_error, _f("%1%: %2%") % err.source() % err.asString()); } -static inline void rewind(Data * d) { - d->rewind(); -} - istream* decrypted_stream_t::open_stream(const path& filename) { init_lib(); @@ -171,7 +167,7 @@ istream* decrypted_stream_t::open_stream(const path& filename) { auto enc_d = setup_cipher_buffer(file.get()); if (is_encrypted(enc_d)) { auto dec_d = decrypt(enc_d); - rewind(dec_d.get()); + dec_d.get()->rewind(); return new decrypted_stream_t(dec_d); } return new ifstream(filename); @@ -184,7 +180,7 @@ decrypted_stream_t::decrypted_stream_t(path& filename) file = open_file(filename); auto enc_d = setup_cipher_buffer(file); dec_d = decrypt(enc_d); - rewind(dec_d.get()); + dec_d.get()->rewind(); if (is_encrypted(enc_d)) { fclose(file); -- cgit v1.2.3