From 65e73074d9c9984b8ca9c0708f23aa8ea6e5f2ce Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Fri, 13 Jun 2014 11:34:01 +0200 Subject: [PATCH] os: forward args for Lazy_volatile_object This patch makes the handling of constructor arguments consistent among the Volatile_object and Lazy_volatile_object classes. Arguments are always forwarded. Otherwise, passing a reference as argument would result in an unwanted copy of the passed object. --- repos/os/include/util/volatile_object.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repos/os/include/util/volatile_object.h b/repos/os/include/util/volatile_object.h index 01df22d350..eb7aae94a7 100644 --- a/repos/os/include/util/volatile_object.h +++ b/repos/os/include/util/volatile_object.h @@ -146,7 +146,7 @@ template struct Genode::Lazy_volatile_object : Volatile_object { template - Lazy_volatile_object(ARGS... args) + Lazy_volatile_object(ARGS &&... args) : Volatile_object((typename Volatile_object::Lazy *)0) { }