summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dnn/Event.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/dnn/Event.h b/dnn/Event.h
index cacb2e8..3181f81 100644
--- a/dnn/Event.h
+++ b/dnn/Event.h
@@ -15,6 +15,10 @@
#ifndef DnnEvent_H_
#define DnnEvent_H_
+#ifdef __GNUG__
+#pragma interface
+#endif
+
#include "cplus_bugs.h"
#include "ccu/String.h"
#include "ccu/List.h"
@@ -72,7 +76,7 @@ public:
DnnEventType (const char*, const DnnEventFeatureList&);
~DnnEventType ();
inline int operator == (const DnnEventType& evt) const { return (this == &evt); }
-inline int GetTotalSize () const { return FeaturesOffsets [NbFeatures - 1]; }
+inline int GetTotalSize () const { return (NbFeatures) > 0 ? FeaturesOffsets [NbFeatures - 1] : 0; }
inline int GetOffset (int i) const { return i ? FeaturesOffsets [i-1] : 0; }
inline int GetSize (int i) const { return FeaturesOffsets [i] - (i ? FeaturesOffsets [i-1] : 0); }
#if 0