From 68cec34f267bb57426db564a922847b087872627 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaakko=20Ker=C3=A4nen?= Date: Mon, 12 Oct 2015 22:36:39 +0300 Subject: [PATCH] libcore: More flexible applyFlagOperation() template Allow the second argument to be a different type. --- doomsday/sdk/libcore/include/de/libcore.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doomsday/sdk/libcore/include/de/libcore.h b/doomsday/sdk/libcore/include/de/libcore.h index e65804522a..8e06174a89 100644 --- a/doomsday/sdk/libcore/include/de/libcore.h +++ b/doomsday/sdk/libcore/include/de/libcore.h @@ -462,8 +462,8 @@ enum FlagOp { ReplaceFlags = 2 ///< Specified flags become the new set of flags, replacing all previous flags. }; -template -void applyFlagOperation(FlagsType &flags, FlagsType const &newFlags, FlagOp operation) { +template +void applyFlagOperation(FlagsType &flags, FlagsCompatibleType const &newFlags, FlagOp operation) { switch(operation) { case SetFlags: flags |= newFlags; break; case UnsetFlags: flags &= ~newFlags; break;