[svn-r3114] Purpose: Fix

Description:
	Dec CC compiler doesn't support some new c++ features.
	Some typos caused compilation erros on Dec Alpha.

Solution:
        - Added macro BOOL_NOTDEFINED to define bool type on Dec
          Alpha (gondolin) since its compiler doesn't support bool.
	- Added macro NO_STATIC_CAST to prevent the use of the new
	  c++ feature static_cast since Dec CC compiler doesn't support.
	- Added const to parameters of some functions to match the
	  functions' declaration and definition.  Typos errors and
	  Dec CC complained.

Platform:
	Solaris (arabica).  Also tried to build on Dec Alpha but still
	not linked due to some missing compiler flags; its compilation
	went fine though.
This commit is contained in:
Binh-Minh Ribler
2000-12-11 23:40:09 -05:00
parent 3dcc29ec41
commit 84fadb9f74
12 changed files with 39 additions and 14 deletions

View File

@@ -22,7 +22,11 @@ namespace H5 {
extern "C" herr_t userAttrOpWrpr( hid_t loc_id, const char* attr_name, void* op_data )
{
string s_attr_name = string( attr_name );
#ifdef NO_STATIC_CAST
UserData4Aiterate* myData = (UserData4Aiterate *) op_data;
#else
UserData4Aiterate* myData = static_cast <UserData4Aiterate *> (op_data);
#endif
myData->op( *myData->object, s_attr_name, myData->opData );
return 0;
}
@@ -32,7 +36,7 @@ extern "C" herr_t userAttrOpWrpr( hid_t loc_id, const char* attr_name, void* op_
H5Object::H5Object() : IdComponent() {}
// Constructs an object from an existing HDF5 id
H5Object::H5Object( hid_t object_id ) : IdComponent( object_id ) {}
H5Object::H5Object( const hid_t object_id ) : IdComponent( object_id ) {}
// Copy constructor: makes a copy of the original H5Object instance
H5Object::H5Object( const H5Object& original ) : IdComponent( original ) {}
@@ -85,7 +89,7 @@ Attribute H5Object::openAttribute( const string& name ) const
}
// Opens an attribute given its index.
Attribute H5Object::openAttribute( unsigned int idx ) const
Attribute H5Object::openAttribute( const unsigned int idx ) const
{
hid_t attr_id = H5Aopen_idx( id, idx );
if( attr_id > 0 )