lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master f4580cf 9/9: Don't ref-qualify save()


From: Greg Chicares
Subject: [lmi-commits] [lmi] master f4580cf 9/9: Don't ref-qualify save()
Date: Wed, 4 Apr 2018 21:27:38 -0400 (EDT)

branch: master
commit f4580cfeaed0cc60b2454758f46304a029c5e0a3
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Don't ref-qualify save()
    
    See:
      https://lists.nongnu.org/archive/html/lmi/2018-04/msg00007.html
---
 group_quote_pdf_gen_wx.cpp  | 2 +-
 ledger_pdf_generator_wx.cpp | 2 +-
 pdf_writer_wx.cpp           | 7 +------
 pdf_writer_wx.hpp           | 2 +-
 4 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/group_quote_pdf_gen_wx.cpp b/group_quote_pdf_gen_wx.cpp
index 8162182..f786259 100644
--- a/group_quote_pdf_gen_wx.cpp
+++ b/group_quote_pdf_gen_wx.cpp
@@ -795,7 +795,7 @@ void group_quote_pdf_generator_wx::save(std::string const& 
output_filename)
     LMI_ASSERT(current_page == total_pages);
     output_page_number_and_version(pdf_writer, total_pages, current_page);
 
-    std::move(pdf_writer).save();
+    pdf_writer.save();
 }
 
 int group_quote_pdf_generator_wx::compute_pages_for_table_rows
diff --git a/ledger_pdf_generator_wx.cpp b/ledger_pdf_generator_wx.cpp
index c207c45..9b7a18f 100644
--- a/ledger_pdf_generator_wx.cpp
+++ b/ledger_pdf_generator_wx.cpp
@@ -781,7 +781,7 @@ class pdf_illustration : protected html_interpolator
             page->render(ledger_, writer, *this);
             }
 
-        std::move(writer).save();
+        writer.save();
     }
 
     // Methods to be implemented by the derived classes to indicate which
diff --git a/pdf_writer_wx.cpp b/pdf_writer_wx.cpp
index d9b2474..db7c11f 100644
--- a/pdf_writer_wx.cpp
+++ b/pdf_writer_wx.cpp
@@ -254,13 +254,8 @@ int pdf_writer_wx::get_page_bottom() const
 }
 
 /// Save the PDF to the output file name specified in the ctor.
-///
-/// This object becomes unusable after saving, i.e. no other methods can be
-/// called on it. To help with preventing using any of them accidentally,
-/// this method is rvalue-reference-qualified, meaning that calling
-/// std::move() is required to call it.
 
-void pdf_writer_wx::save() &&
+void pdf_writer_wx::save()
 {
     LMI_ASSERT(!save_has_been_called_);
     pdf_dc_.EndDoc();
diff --git a/pdf_writer_wx.hpp b/pdf_writer_wx.hpp
index 7e36328..1bf0431 100644
--- a/pdf_writer_wx.hpp
+++ b/pdf_writer_wx.hpp
@@ -54,7 +54,7 @@ class pdf_writer_wx
 
     ~pdf_writer_wx();
 
-    void save() &&;
+    void save();
 
     // Wherever possible, use the following high-level functions
     // instead of working at a lower level with the dc() accessor.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]