From 89ad033f87b105b9802ad375367d7b2593ed3d25 Mon Sep 17 00:00:00 2001
From: Jan David Mol <mol@astron.nl>
Date: Thu, 22 Mar 2012 13:52:53 +0000
Subject: [PATCH] Task #2669: Move FIRST_ and LAST_ into enum range to make
 them valid values.

---
 RTCP/Interface/include/Interface/OutputTypes.h | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/RTCP/Interface/include/Interface/OutputTypes.h b/RTCP/Interface/include/Interface/OutputTypes.h
index 808029bfa4a..3f0f8f1ad92 100644
--- a/RTCP/Interface/include/Interface/OutputTypes.h
+++ b/RTCP/Interface/include/Interface/OutputTypes.h
@@ -8,13 +8,13 @@ enum OutputType
 {
   CORRELATED_DATA = 1,
   BEAM_FORMED_DATA,
-  TRIGGER_DATA
-};
-
-
-const OutputType FIRST_OUTPUT_TYPE = static_cast<OutputType>(1);
-const OutputType LAST_OUTPUT_TYPE  = static_cast<OutputType>(4); // exclusive
+  TRIGGER_DATA,
 
+  // define LAST and FIRST in the enum to make them valid values within the
+  // allocated range for the enum (=minimal number of bits to store all values)
+  LAST_OUTPUT_TYPE,
+  FIRST_OUTPUT_TYPE = 1
+};
 
 inline OutputType operator ++ (OutputType &outputType) // prefix ++
 {
-- 
GitLab