From b148629d560d9bc2ce8a0be64a232b02d5e57686 Mon Sep 17 00:00:00 2001 From: Guillaume Munch Date: Tue, 14 Jun 2016 16:42:52 +0100 Subject: [PATCH] Fix compilation with gcc 4.6 --- src/support/unicode.cpp | 7 +++++++ src/support/unicode.h | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/support/unicode.cpp b/src/support/unicode.cpp index 187d018f2b..adec55299c 100644 --- a/src/support/unicode.cpp +++ b/src/support/unicode.cpp @@ -66,6 +66,13 @@ IconvProcessor::IconvProcessor(string tocode, string fromcode) {} +// for gcc 4.6 +IconvProcessor::IconvProcessor(IconvProcessor && other) + : tocode_(move(other.tocode_)), fromcode_(move(other.fromcode_)), + h_(move(other.h_)) +{} + + bool IconvProcessor::init() { if (h_) diff --git a/src/support/unicode.h b/src/support/unicode.h index 6373e470ba..17b95dd290 100644 --- a/src/support/unicode.h +++ b/src/support/unicode.h @@ -62,8 +62,8 @@ public: char * out_buffer, size_t max_out_size); /// target encoding std::string to() const { return tocode_; } - // required by g++ 4.7 - IconvProcessor(IconvProcessor &&) = default; + // required by g++ 4.6 + IconvProcessor(IconvProcessor && other); }; /// Get the global IconvProcessor instance of the current thread for