summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlexis Hildebrandt <afh@surryhill.net>2023-04-18 11:31:50 +0200
committerJohn Wiegley <johnw@newartisans.com>2023-04-18 10:14:54 -0700
commitf00cf4560bb38df429ef711d15dbbeccaf5699d0 (patch)
tree84a18ba28f5b7ac8c8af5a0fb37b301298ff8551 /src
parent8536ff2d45216914e01678adf6fdb67fbe7e1324 (diff)
downloadfork-ledger-f00cf4560bb38df429ef711d15dbbeccaf5699d0.tar.gz
fork-ledger-f00cf4560bb38df429ef711d15dbbeccaf5699d0.tar.bz2
fork-ledger-f00cf4560bb38df429ef711d15dbbeccaf5699d0.zip
gpgme: Remove obsoleted rewind wrapper function
kudos to @spacefrogg
Diffstat (limited to 'src')
-rw-r--r--src/gpgme.cc8
1 files changed, 2 insertions, 6 deletions
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);