From a22dcaaa786de67786eeaeb47598ed76339249ad Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Tue, 22 Jan 2019 15:31:22 +0200 Subject: cam: options: Don't implement move semantics for OptionsParser::Options MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The compiler creates a move constructor automatically when none is supplied, and it does the right thing by default in this case. Using std::move() inside the function prevents the compiler from doing return value optimization and actually hinders performances. Using std::move() in the caller is unnecessary, the move constructor is used automatically by the compiler. For all these reasons remove the tentative optimization that resulted in worse performances and worse code. Signed-off-by: Laurent Pinchart Reviewed-by: Niklas Söderlund --- src/cam/options.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/cam/options.h') diff --git a/src/cam/options.h b/src/cam/options.h index 88336dfe..f99ea730 100644 --- a/src/cam/options.h +++ b/src/cam/options.h @@ -23,8 +23,6 @@ public: class Options { public: Options(); - Options(Options &&other); - Options &operator=(Options &&other); bool valid() const; bool isSet(int opt) const; -- cgit v1.2.1