From 0b828ee3822beec1378f84e4c66dfb91eb003d9a Mon Sep 17 00:00:00 2001 From: chatty Date: Tue, 10 May 1994 08:50:50 +0000 Subject: Added pragma interface for g++ --- dnn/Event.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 -- cgit v1.1