From 0e89c832965118e798dfd60221001c6ca182f1ad Mon Sep 17 00:00:00 2001 From: Jeff Hill Date: Mon, 30 Jun 1997 18:16:13 +0000 Subject: [PATCH] guess at DEC C++ compiler bug workaround --- src/cxxTemplates/resourceLib.h | 10 +++++++++- src/libCom/cxxTemplates/resourceLib.h | 10 +++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/cxxTemplates/resourceLib.h b/src/cxxTemplates/resourceLib.h index 751e38498..a0002a168 100644 --- a/src/cxxTemplates/resourceLib.h +++ b/src/cxxTemplates/resourceLib.h @@ -29,6 +29,9 @@ * * History * $Log$ + * Revision 1.12 1997/06/25 05:48:39 jhill + * moved resourceLib.cc into resourceLib.h + * * Revision 1.11 1997/06/13 18:26:13 jhill * allow epicsAssert.h * @@ -298,6 +301,11 @@ class uintRes : public uintId, public tsSLNode { friend class uintResTable; public: uintRes(unsigned idIn=UINT_MAX) : uintId(idIn) {} +private: + // + // workaround for bug in DEC compiler + // + void setId(unsigned newId) {this->id = newId;} }; // @@ -312,7 +320,7 @@ inline void uintResTable::installItem(ITEM &item) { int resTblStatus; do { - item.uintRes::id = allocId++; + item.uintRes::setId(allocId++); resTblStatus = this->add(item); } while (resTblStatus); diff --git a/src/libCom/cxxTemplates/resourceLib.h b/src/libCom/cxxTemplates/resourceLib.h index 751e38498..a0002a168 100644 --- a/src/libCom/cxxTemplates/resourceLib.h +++ b/src/libCom/cxxTemplates/resourceLib.h @@ -29,6 +29,9 @@ * * History * $Log$ + * Revision 1.12 1997/06/25 05:48:39 jhill + * moved resourceLib.cc into resourceLib.h + * * Revision 1.11 1997/06/13 18:26:13 jhill * allow epicsAssert.h * @@ -298,6 +301,11 @@ class uintRes : public uintId, public tsSLNode { friend class uintResTable; public: uintRes(unsigned idIn=UINT_MAX) : uintId(idIn) {} +private: + // + // workaround for bug in DEC compiler + // + void setId(unsigned newId) {this->id = newId;} }; // @@ -312,7 +320,7 @@ inline void uintResTable::installItem(ITEM &item) { int resTblStatus; do { - item.uintRes::id = allocId++; + item.uintRes::setId(allocId++); resTblStatus = this->add(item); } while (resTblStatus);