ORBit2-cpp and gcc-3.2




Hi,

I tried to compile the cpp branch of ORBit2 using gcc-3.2, and it didn't
work. The reason is that gcc-3.2 doesn't allow assignment of default
values of function parameters in both the function declaration and the
function definition. Attatched is a patch solving the problem (by
removing the assignments from the function definitions).

Regards,

Armin van der Togt
diff -ur ORBit2-cpp/src/idl-compiler/cpp/language.cc ORBit2-cpp-new/src/idl-compiler/cpp/language.cc
--- ORBit2-cpp/src/idl-compiler/cpp/language.cc	2002-03-07 18:33:41.000000000 +0100
+++ ORBit2-cpp-new/src/idl-compiler/cpp/language.cc	2002-08-24 12:35:40.000000000 +0200
@@ -154,7 +154,7 @@
 
 string 
 IDLElement::getQualifiedIDLIdentifier(IDLScope const *up_to,
-        IDLScope const *assumed_base = NULL) const {
+        IDLScope const *assumed_base) const {
 	if (up_to == this) return "";
 	IDLScope const *run = assumed_base ? assumed_base : getParentScope();
 
@@ -172,7 +172,7 @@
 
 string 
 IDLElement::getQualifiedCIdentifier(IDLScope const *up_to,
-        IDLScope const *assumed_base = NULL) const {
+        IDLScope const *assumed_base) const {
 	if (up_to == this) return "";
 	IDLScope const *run = assumed_base ? assumed_base : getParentScope();
 
@@ -192,7 +192,7 @@
 
 string 
 IDLElement::getQualifiedCPPIdentifier(IDLScope const *up_to,
-        IDLScope const *assumed_base = NULL) const {
+        IDLScope const *assumed_base) const {
 	if (up_to == this) return "";
 	IDLScope const *run = assumed_base ? assumed_base : getParentScope();
 
@@ -390,7 +390,7 @@
 
 // IDLCaseStmt ---------------------------------------------------------------
 IDLCaseStmt::IDLCaseStmt(IDLMember *member, string const &id,
-						 IDL_tree node,IDLScope *parentscope = NULL)
+						 IDL_tree node,IDLScope *parentscope)
 	: IDLElement(id,node,parentscope), m_member(member),m_isDefault(false) {
 
 	// labels
diff -ur ORBit2-cpp/src/idl-compiler/cpp/types/IDLAny.cc ORBit2-cpp-new/src/idl-compiler/cpp/types/IDLAny.cc
--- ORBit2-cpp/src/idl-compiler/cpp/types/IDLAny.cc	2002-03-12 00:57:21.000000000 +0100
+++ ORBit2-cpp-new/src/idl-compiler/cpp/types/IDLAny.cc	2002-08-24 12:26:59.000000000 +0200
@@ -41,18 +41,18 @@
 	return true;
 }
 
-void IDLAny::getCPPStructCtorDeclarator(string const &id, string &typespec, string &dcl, IDLTypedef const *activeTypedef = NULL) const
+void IDLAny::getCPPStructCtorDeclarator(string const &id, string &typespec, string &dcl, IDLTypedef const *activeTypedef) const
 {
 	typespec = "const " + getTypeName() + "&";
 	dcl = "_par_" + id;
 }
 
-void IDLAny::writeCPPStructCtor(ostream &ostr, Indent &indent, string const &id, IDLTypedef const *activeTypedef = NULL) const
+void IDLAny::writeCPPStructCtor(ostream &ostr, Indent &indent, string const &id, IDLTypedef const *activeTypedef) const
 {
 	ostr << indent << id << " = _par_" << id << ';' << endl;
 }
 
-void IDLAny::getCPPStubDeclarator(IDL_param_attr attr, string const &id, string &typespec, string &dcl, IDLTypedef const *activeTypedef=NULL) const
+void IDLAny::getCPPStubDeclarator(IDL_param_attr attr, string const &id, string &typespec, string &dcl, IDLTypedef const *activeTypedef) const
 {
 	switch (attr) {
 	case IDL_PARAM_IN:
@@ -69,7 +69,7 @@
 		break;
 	}
 }
-string IDLAny::getCPPStubParameterTerm(IDL_param_attr attr, string const &id, IDLTypedef const *activeTypedef = NULL) const
+string IDLAny::getCPPStubParameterTerm(IDL_param_attr attr, string const &id, IDLTypedef const *activeTypedef) const
 {
 	string retval;
 	switch (attr) {
@@ -85,13 +85,13 @@
 }
 
 // stub return stuff
-void IDLAny::getCPPStubReturnDeclarator(string const &id, string &typespec, string &dcl, IDLTypedef const *activeTypedef = NULL) const
+void IDLAny::getCPPStubReturnDeclarator(string const &id, string &typespec, string &dcl, IDLTypedef const *activeTypedef) const
 {
 	typespec = IDL_CORBA_NS "::Any";
 	dcl = "*" + id;
 }
 
-void IDLAny::writeCPPStubReturnPrepCode(ostream &ostr, Indent &indent, IDLTypedef const *activeTypedef = NULL) const
+void IDLAny::writeCPPStubReturnPrepCode(ostream &ostr, Indent &indent, IDLTypedef const *activeTypedef) const
 {
 	ostr << indent << "CORBA_any *_retval = NULL;" << endl;
 }
@@ -100,14 +100,14 @@
 	return "_retval = ";
 }
 
-void IDLAny::writeCPPStubReturnDemarshalCode(ostream &ostr, Indent &indent, IDLTypedef const *activeTypedef = NULL) const
+void IDLAny::writeCPPStubReturnDemarshalCode(ostream &ostr, Indent &indent, IDLTypedef const *activeTypedef) const
 {
 	ostr << indent << "return "
 		<< idlGetCast("_retval", IDL_CORBA_NS "::Any*" ) << ";" << endl;
 }
 
 // skel stuff
-void IDLAny::getCSkelDeclarator(IDL_param_attr attr, string const &id, string &typespec, string &dcl, IDLTypedef const *activeTypedef = NULL) const
+void IDLAny::getCSkelDeclarator(IDL_param_attr attr, string const &id, string &typespec, string &dcl, IDLTypedef const *activeTypedef) const
 {
 	switch( attr ) {
 	case IDL_PARAM_IN:
@@ -124,7 +124,7 @@
 	}
 }
 
-string IDLAny::getCPPSkelParameterTerm(IDL_param_attr attr, string const &id, IDLTypedef const *activeTypedef = NULL) const
+string IDLAny::getCPPSkelParameterTerm(IDL_param_attr attr, string const &id, IDLTypedef const *activeTypedef) const
 {
 	switch(attr) {
 	case IDL_PARAM_IN:
@@ -138,23 +138,23 @@
 
 // skel return stuff
 void IDLAny::getCSkelReturnDeclarator(string const &id, string &typespec, string &dcl,
-							  IDLTypedef const *activeTypedef = NULL) const
+							  IDLTypedef const *activeTypedef) const
 {
 	typespec = "CORBA_any";
 	dcl = "*"+id;
 }
 
-void IDLAny::writeCPPSkelReturnPrepCode(ostream &ostr, Indent &indent,bool passthru, IDLTypedef const *activeTypedef = NULL) const
+void IDLAny::writeCPPSkelReturnPrepCode(ostream &ostr, Indent &indent,bool passthru, IDLTypedef const *activeTypedef) const
 {
 	ostr << indent << IDL_CORBA_NS "::Any *_retval = NULL;" << endl;
 }
 
-string IDLAny::getCPPSkelReturnAssignment(bool passthru, IDLTypedef const *activeTypedef = NULL) const
+string IDLAny::getCPPSkelReturnAssignment(bool passthru, IDLTypedef const *activeTypedef) const
 {
 	return "_retval = ";
 }
 
-void IDLAny::writeCPPSkelReturnMarshalCode(ostream &ostr, Indent &indent,bool passthru, IDLTypedef const *activeTypedef = NULL) const
+void IDLAny::writeCPPSkelReturnMarshalCode(ostream &ostr, Indent &indent,bool passthru, IDLTypedef const *activeTypedef) const
 {
 	ostr << indent << "return "
 		<< idlGetCast( "_retval", "CORBA_any*") << ";" << endl;
diff -ur ORBit2-cpp/src/idl-compiler/cpp/types/IDLArray.cc ORBit2-cpp-new/src/idl-compiler/cpp/types/IDLArray.cc
--- ORBit2-cpp/src/idl-compiler/cpp/types/IDLArray.cc	2002-03-12 00:57:21.000000000 +0100
+++ ORBit2-cpp-new/src/idl-compiler/cpp/types/IDLArray.cc	2002-08-24 12:27:55.000000000 +0200
@@ -105,7 +105,7 @@
 
 void
 IDLArray::getCPPMemberDeclarator(string const &id,string &typespec,string &dcl,
-							IDLTypedef const *activeTypedef = NULL) const {
+							IDLTypedef const *activeTypedef) const {
 	if( activeTypedef ) {
 		typespec = activeTypedef->getQualifiedCPPIdentifier(activeTypedef->getRootScope());
 		dcl = id;
@@ -123,7 +123,7 @@
 void
 IDLArray::writeTypedef(ostream &ostr,Indent &indent,IDLCompilerState &state,
 					   IDLElement &dest,IDLScope const &scope,
-					   IDLTypedef const *activeTypedef = NULL) const {
+					   IDLTypedef const *activeTypedef) const {
 
 	string typespec,dcl,str_static="";
 	m_elementType.getCPPMemberDeclarator("",typespec,dcl);
@@ -251,7 +251,7 @@
 
 void
 IDLArray::getCPPStructCtorDeclarator(string const &id,string &typespec,string &dcl,
-										IDLTypedef const *activeTypedef = NULL) const {
+										IDLTypedef const *activeTypedef) const {
 	getCPPMemberDeclarator(id, typespec, dcl, activeTypedef);
 	typespec = "const " + typespec;
 	dcl = "_par_" + dcl;
@@ -259,7 +259,7 @@
 
 void
 IDLArray::writeCPPStructCtor(ostream &ostr,Indent &indent,string const &id,
-								IDLTypedef const *activeTypedef = NULL) const {
+								IDLTypedef const *activeTypedef) const {
 	if(activeTypedef) {
 		ostr
 		<< indent << activeTypedef->getQualifiedCPPIdentifier() << "_copy("
@@ -271,7 +271,7 @@
 
 void
 IDLArray::writeCPPStructPacker(ostream &ostr,Indent &indent,string const &id,
-								  IDLTypedef const *activeTypedef = NULL) const {
+								  IDLTypedef const *activeTypedef) const {
 	if( activeTypedef ) {
 		ostr
 		<< indent << activeTypedef->getQualifiedCPPIdentifier() << "_copy("
@@ -288,7 +288,7 @@
 
 void
 IDLArray::writeCPPStructUnpacker(ostream &ostr,Indent &indent,string const &id,
-									IDLTypedef const *activeTypedef = NULL) const {
+									IDLTypedef const *activeTypedef) const {
 	if( activeTypedef ) {
 		ostr
 		<< indent << activeTypedef->getQualifiedCPPIdentifier() << "_copy("
@@ -308,7 +308,7 @@
 
 void
 IDLArray::writeUnionModifiers(ostream &ostr,Indent &indent, string const &id, string const &discriminatorVal,
-									IDLTypedef const *activeTypedef = NULL) const{
+									IDLTypedef const *activeTypedef) const{
 	string typespec,dcl;
 	getCPPStubDeclarator(IDL_PARAM_IN,"param",typespec,dcl,activeTypedef);
 	ostr
@@ -328,7 +328,7 @@
 
 void
 IDLArray::writeUnionAccessors(ostream &ostr,Indent &indent, string const &id, string const &discriminatorVal,
-									IDLTypedef const *activeTypedef = NULL) const{
+									IDLTypedef const *activeTypedef) const{
 	string typespec,dcl;
 	g_assert(activeTypedef);
 	getCPPStubDeclarator(IDL_PARAM_IN,"",typespec,dcl,activeTypedef);
@@ -344,7 +344,7 @@
 
 void
 IDLArray::writeUnionReferents(ostream &ostr,Indent &indent, string const &id, string const &discriminatorVal,
-							IDLTypedef const *activeTypedef = NULL) const{
+							IDLTypedef const *activeTypedef) const{
 	string typespec,dcl;
 	g_assert(activeTypedef);
 	getCPPStubDeclarator(IDL_PARAM_IN,"",typespec,dcl,activeTypedef);
@@ -362,7 +362,7 @@
 // stub stuff
 void
 IDLArray::getCPPStubDeclarator(IDL_param_attr attr,string const &id,string &typespec,string &dcl,
-							  IDLTypedef const *activeTypedef=NULL) const {
+							  IDLTypedef const *activeTypedef) const {
 	typespec = attr == IDL_PARAM_IN ? "const " : "";
 	typespec += activeTypedef ?
 		activeTypedef->getQualifiedCPPIdentifier() : getTypeName();
@@ -373,7 +373,7 @@
 
 void
 IDLArray::getCSkelDeclarator(IDL_param_attr attr,string const &id,string &typespec,string &dcl,
-							IDLTypedef const *activeTypedef = NULL) const {
+							IDLTypedef const *activeTypedef) const {
 	g_assert(activeTypedef);
 	typespec = attr == IDL_PARAM_IN ? "const " : "";
 	typespec += activeTypedef->getNSScopedCTypeName();
@@ -386,7 +386,7 @@
 
 void
 IDLArray::getCPPStubReturnDeclarator(string const &id,string &typespec,string &dcl,
-									 IDLTypedef const *activeTypedef = NULL) const {
+									 IDLTypedef const *activeTypedef) const {
 	g_assert(activeTypedef);
 	typespec = activeTypedef->getQualifiedCPPIdentifier() + "_slice";
 	dcl = "*" + id;
@@ -394,7 +394,7 @@
 
 void
 IDLArray::getCSkelReturnDeclarator(string const &id,string &typespec,string &dcl,
-								  IDLTypedef const *activeTypedef = NULL) const {
+								  IDLTypedef const *activeTypedef) const {
 	g_assert(activeTypedef);
 	typespec = activeTypedef->getNSScopedCTypeName() + "_slice";
 	dcl = "*" + id;
@@ -403,7 +403,7 @@
 
 string
 IDLArray::getCPPStubParameterTerm(IDL_param_attr attr,string const &id,
-								   IDLTypedef const *activeTypedef = NULL) const {
+								   IDLTypedef const *activeTypedef) const {
 	string typespec,dcl;
 	getCSkelDeclarator(attr,"",typespec,dcl,activeTypedef);
 	
@@ -419,7 +419,7 @@
 
 string
 IDLArray::getCPPSkelParameterTerm(IDL_param_attr attr,string const &id,
-								   IDLTypedef const *activeTypedef = NULL) const {
+								   IDLTypedef const *activeTypedef) const {
 	string typespec,dcl;
 	getCPPStubDeclarator(attr,"",typespec,dcl,activeTypedef);
 	string term;
diff -ur ORBit2-cpp/src/idl-compiler/cpp/types/IDLEnum.cc ORBit2-cpp-new/src/idl-compiler/cpp/types/IDLEnum.cc
--- ORBit2-cpp/src/idl-compiler/cpp/types/IDLEnum.cc	2002-03-12 00:57:21.000000000 +0100
+++ ORBit2-cpp-new/src/idl-compiler/cpp/types/IDLEnum.cc	2002-08-24 12:29:08.000000000 +0200
@@ -26,7 +26,7 @@
 
 #include "IDLEnum.hh"
 
-IDLEnum::IDLEnum(string const &id,IDL_tree node,IDLScope *parentscope = NULL)
+IDLEnum::IDLEnum(string const &id,IDL_tree node,IDLScope *parentscope)
 : IDLUserDefSimpleType(id,node,parentscope)
 {		
 
diff -ur ORBit2-cpp/src/idl-compiler/cpp/types/IDLInterface.cc ORBit2-cpp-new/src/idl-compiler/cpp/types/IDLInterface.cc
--- ORBit2-cpp/src/idl-compiler/cpp/types/IDLInterface.cc	2002-04-16 19:02:10.000000000 +0200
+++ ORBit2-cpp-new/src/idl-compiler/cpp/types/IDLInterface.cc	2002-08-24 12:29:57.000000000 +0200
@@ -53,7 +53,7 @@
 void
 IDLInterface::writeTypedef(ostream &ostr,Indent &indent,IDLCompilerState &state,
 						   IDLElement &dest,IDLScope const &scope,
-						   IDLTypedef const *activeTypedef = NULL) const {
+						   IDLTypedef const *activeTypedef) const {
 	string id = dest.getCPPIdentifier();
 	ostr
 	<< indent << "typedef " << getCPPIdentifier() << ' ' << id << ';' << endl
@@ -89,7 +89,7 @@
 
 void
 IDLInterface::writeCPPStructPacker(ostream &ostr,Indent &indent,string const &id,
-								      IDLTypedef const *activeTypedef = NULL) const {
+								      IDLTypedef const *activeTypedef) const {
 	ostr
 	<< indent << IDL_IMPL_NS "::release_guarded(_cstruct." << id << ");" << endl
 	<< indent << "_cstruct." << id << " = "
@@ -101,7 +101,7 @@
 
 void
 IDLInterface::writeCPPStructUnpacker(ostream &ostr,Indent &indent,string const &id,
-									    IDLTypedef const *activeTypedef = NULL) const {
+									    IDLTypedef const *activeTypedef) const {
 	ostr
 	<< id << " = "
 	<< getQualifiedCPPCast(IDL_IMPL_NS "::duplicate_guarded(_cstruct."+id+")")
@@ -113,7 +113,7 @@
 
 void
 IDLInterface::getCPPStubDeclarator(IDL_param_attr attr,string const &id,string &typespec,string &dcl,
-								   IDLTypedef const *activeTypedef=NULL) const {
+								   IDLTypedef const *activeTypedef) const {
 	dcl = id;
 
 	switch (attr) {
@@ -133,7 +133,7 @@
 
 
 string
-IDLInterface::getCPPStubParameterTerm(IDL_param_attr attr, string const &id, IDLTypedef const *activeTypedef = NULL) const
+IDLInterface::getCPPStubParameterTerm(IDL_param_attr attr, string const &id, IDLTypedef const *activeTypedef) const
 {
 	string ctype = getNSScopedCTypeName();
 
@@ -153,7 +153,7 @@
 
 void
 IDLInterface::writeCPPStubReturnDemarshalCode(ostream &ostr,Indent &indent,
-											  IDLTypedef const *activeTypedef = NULL) const {
+											  IDLTypedef const *activeTypedef) const {
 	// must return stub ptr and not ptr in order to work when smart pointers are used
 	ostr
 		<< indent << "return " << getQualifiedCPPStub () << "::_orbitcpp_wrap(_retval);" << endl;
@@ -163,7 +163,7 @@
 
 void
 IDLInterface::getCSkelDeclarator(IDL_param_attr attr,string const &id,string &typespec,string &dcl,
-								 IDLTypedef const *activeTypedef = NULL) const {
+								 IDLTypedef const *activeTypedef) const {
 	typespec = getNSScopedCTypeName();
 
 	switch (attr) {
@@ -184,7 +184,7 @@
 
 void
 IDLInterface::writeCPPSkelDemarshalCode(IDL_param_attr attr,string const &id,ostream &ostr,Indent &indent,
-										IDLTypedef const *activeTypedef = NULL) const {
+										IDLTypedef const *activeTypedef) const {
 	switch (attr) {
 	case IDL_PARAM_IN:
 		ostr
@@ -212,7 +212,7 @@
 
 void
 IDLInterface::writeCPPSkelMarshalCode(IDL_param_attr attr,string const &id,ostream &ostr,Indent &indent,
-									  IDLTypedef const *activeTypedef = NULL) const {
+									  IDLTypedef const *activeTypedef) const {
 	string ptrname = " _" + id + "_ptr";
 	switch (attr) {
 	case IDL_PARAM_INOUT:
@@ -227,7 +227,7 @@
 
 void
 IDLInterface::writeCPPSkelReturnMarshalCode(ostream &ostr,Indent &indent,bool passthru,
-									   IDLTypedef const *activeTypedef = NULL) const
+									   IDLTypedef const *activeTypedef) const
 {
 	ostr << indent << "return _retval->_orbitcpp_cobj ();" << endl;
 }
diff -ur ORBit2-cpp/src/idl-compiler/cpp/types/IDLSequence.cc ORBit2-cpp-new/src/idl-compiler/cpp/types/IDLSequence.cc
--- ORBit2-cpp/src/idl-compiler/cpp/types/IDLSequence.cc	2002-03-27 23:14:06.000000000 +0100
+++ ORBit2-cpp-new/src/idl-compiler/cpp/types/IDLSequence.cc	2002-08-24 12:31:11.000000000 +0200
@@ -92,7 +92,7 @@
 
 void
 IDLSequence::getCPPMemberDeclarator(string const &id,string &typespec,string &dcl,
-									IDLTypedef const *activeTypedef = NULL) const {
+									IDLTypedef const *activeTypedef) const {
 	if(activeTypedef)
 		typespec = activeTypedef->getQualifiedCPPIdentifier(activeTypedef->getRootScope());
 	else
@@ -137,7 +137,7 @@
 void
 IDLSequence::writeTypedef(ostream &ostr,Indent &indent,IDLCompilerState &state,
 						  IDLElement &dest,IDLScope const &scope,
-						  IDLTypedef const *activeTypedef = NULL) const {
+						  IDLTypedef const *activeTypedef) const {
 	if (activeTypedef == NULL) { // if this isn't a typedef of a typedef...
 		string id = getCPPType();
 		ostr
@@ -225,7 +225,7 @@
 
 void
 IDLSequence::getCPPStructCtorDeclarator(string const &id,string &typespec,string &dcl,
-										IDLTypedef const *activeTypedef = NULL) const {
+										IDLTypedef const *activeTypedef) const {
 	getCPPMemberDeclarator(id, typespec, dcl, activeTypedef);
 	typespec = "const " + typespec;
 	dcl = "&_par_" + dcl;
@@ -233,13 +233,13 @@
 
 void
 IDLSequence::writeCPPStructCtor(ostream &ostr,Indent &indent,string const &id,
-								IDLTypedef const *activeTypedef = NULL) const {
+								IDLTypedef const *activeTypedef) const {
 	ostr << indent << id << " = _par_" << id << ';' << endl;
 }
 
 void
 IDLSequence::writeCPPStructPacker(ostream &ostr,Indent &indent,string const &id,
-								  IDLTypedef const *activeTypedef = NULL) const {
+								  IDLTypedef const *activeTypedef) const {
 	string type;
 	if( activeTypedef )
 		type = activeTypedef->getQualifiedCPPIdentifier();
@@ -253,7 +253,7 @@
 
 void
 IDLSequence::writeCPPStructUnpacker(ostream &ostr,Indent &indent,string const &id,
-									IDLTypedef const *activeTypedef = NULL) const {
+									IDLTypedef const *activeTypedef) const {
 	string type;
 	if( activeTypedef )
 		type = activeTypedef->getQualifiedCPPIdentifier();
@@ -271,7 +271,7 @@
 
 void
 IDLSequence::writeUnionReferents(ostream &ostr,Indent &indent, string const &id, string const &discriminatorVal,
-							IDLTypedef const *activeTypedef = NULL) const{
+							IDLTypedef const *activeTypedef) const{
 
 	g_assert(activeTypedef);      //activeTypedef cannot be null for sequences
 	ostr
@@ -285,7 +285,7 @@
 
 
 void IDLSequence::getCPPStubDeclarator(IDL_param_attr attr,string const &id,string &typespec,string &dcl,
-									   IDLTypedef const* activeTypedef=NULL) const {
+									   IDLTypedef const* activeTypedef) const {
 	dcl = id;
 
 	g_assert(activeTypedef);      //activeTypedef cannot be null for sequences
@@ -307,7 +307,7 @@
 
 string
 IDLSequence::getCPPStubParameterTerm(IDL_param_attr attr,string const &id,
-									 IDLTypedef const *activeTypedef = NULL) const {
+									 IDLTypedef const *activeTypedef) const {
 
 	string typespec,dcl, retval;
 	getCSkelDeclarator(attr,"",typespec,dcl,activeTypedef);
@@ -328,7 +328,7 @@
 
 void
 IDLSequence::getCPPStubReturnDeclarator(string const &id,string &typespec,string &dcl,
-IDLTypedef const *activeTypedef = NULL) const {
+IDLTypedef const *activeTypedef) const {
 	typespec = activeTypedef->getQualifiedCPPIdentifier();
 	if (isVariableLength())
 		dcl = "*" + id;
@@ -338,7 +338,7 @@
 
 void
 IDLSequence::writeCPPStubReturnPrepCode(ostream &ostr,Indent &indent,
-IDLTypedef const *activeTypedef = NULL) const {
+IDLTypedef const *activeTypedef) const {
 
 	ostr
 	<< indent << activeTypedef->getNSScopedCTypeName();
@@ -356,7 +356,7 @@
 
 void
 IDLSequence::writeCPPStubReturnDemarshalCode(ostream &ostr,Indent &indent,
-											 IDLTypedef const *activeTypedef = NULL) const {
+											 IDLTypedef const *activeTypedef) const {
 	ostr << indent << "return reinterpret_cast< " << activeTypedef->getQualifiedCPPIdentifier();
 	if(isVariableLength())
 		ostr << "*";
@@ -368,7 +368,7 @@
 
 void
 IDLSequence::getCSkelDeclarator(IDL_param_attr attr,string const &id,string &typespec,string &dcl,
-								IDLTypedef const *activeTypedef = NULL) const {
+								IDLTypedef const *activeTypedef) const {
 	typespec = activeTypedef->getNSScopedCTypeName();
 
 	switch (attr) {
@@ -390,13 +390,13 @@
 
 void
 IDLSequence::writeCPPSkelDemarshalCode(IDL_param_attr attr,string const &id,ostream &ostr,Indent &indent,
-									   IDLTypedef const *activeTypedef = NULL) const {
+									   IDLTypedef const *activeTypedef) const {
 	// no demarshalling code required
 }
 
 string
 IDLSequence::getCPPSkelParameterTerm(IDL_param_attr attr,string const &id,
-									 IDLTypedef const *activeTypedef = NULL) const {
+									 IDLTypedef const *activeTypedef) const {
 	string typespec,dcl;
 	getCPPStubDeclarator(attr,"",typespec,dcl,activeTypedef);
 
@@ -417,21 +417,21 @@
 
 void
 IDLSequence::writeCPPSkelMarshalCode(IDL_param_attr attr,string const &id,ostream &ostr,Indent &indent,
-									 IDLTypedef const *activeTypedef = NULL) const {
+									 IDLTypedef const *activeTypedef) const {
 	// no marshalling code required
 }
 
 
 void
 IDLSequence::getCSkelReturnDeclarator(string const &id,string &typespec,string &dcl,
-									  IDLTypedef const *activeTypedef = NULL) const {
+									  IDLTypedef const *activeTypedef) const {
 	typespec = activeTypedef->getNSScopedCTypeName();
 	dcl = "*" + id;
 }
 
 void
 IDLSequence::writeCPPSkelReturnPrepCode(ostream &ostr,Indent &indent,bool passthru,
-										IDLTypedef const *activeTypedef = NULL) const {
+										IDLTypedef const *activeTypedef) const {
 	ostr << indent << activeTypedef->getQualifiedCPPIdentifier();
 	if(isVariableLength())
 		ostr << " *_retval = NULL;" << endl;
@@ -441,13 +441,13 @@
 
 string
 IDLSequence::getCPPSkelReturnAssignment(bool passthru,
-										IDLTypedef const *activeTypedef = NULL) const {
+										IDLTypedef const *activeTypedef) const {
 	return "_retval = ";		
 }
 
 void
 IDLSequence::writeCPPSkelReturnMarshalCode(ostream &ostr,Indent &indent,bool passthru,
-										   IDLTypedef const *activeTypedef = NULL) const {
+										   IDLTypedef const *activeTypedef) const {
 	ostr << indent << "return reinterpret_cast< "
 	<< activeTypedef->getNSScopedCTypeName()
 	<< "*>(_retval);" << endl;
diff -ur ORBit2-cpp/src/idl-compiler/cpp/types/IDLSimpleType.cc ORBit2-cpp-new/src/idl-compiler/cpp/types/IDLSimpleType.cc
--- ORBit2-cpp/src/idl-compiler/cpp/types/IDLSimpleType.cc	2002-03-27 23:14:06.000000000 +0100
+++ ORBit2-cpp-new/src/idl-compiler/cpp/types/IDLSimpleType.cc	2002-08-24 12:32:09.000000000 +0200
@@ -49,7 +49,7 @@
 
 // misc stuff
 void IDLSimpleType::getCPPMemberDeclarator(string const &id,string &typespec,string &dcl,
-							IDLTypedef const *activeTypedef = NULL) const
+							IDLTypedef const *activeTypedef) const
 {
 	typespec = getTypeName();
 	dcl = id;
@@ -57,7 +57,7 @@
 
 void IDLSimpleType::writeTypedef(ostream &ostr,Indent &indent,IDLCompilerState &state,
 				  IDLElement &dest,IDLScope const &scope,
-				  IDLTypedef const *activeTypedef = NULL) const
+				  IDLTypedef const *activeTypedef) const
 {
 	ostr
 	<< indent << "typedef " << getTypeName() << ' '
@@ -68,26 +68,26 @@
 
 // struct / exception stuff
 void IDLSimpleType::getCPPStructCtorDeclarator(string const &id,string &typespec,string &dcl,
-								IDLTypedef const *activeTypedef = NULL) const
+								IDLTypedef const *activeTypedef) const
 {
 	typespec = getTypeName();
 	dcl = "_par_" + id;
 }
 
 void IDLSimpleType::writeCPPStructCtor(ostream &ostr,Indent &indent,string const &id,
-						IDLTypedef const *activeTypedef = NULL) const
+						IDLTypedef const *activeTypedef) const
 {
 	ostr << indent << id << " = _par_" << id << ';' << endl;
 }
 
 void IDLSimpleType::writeCPPStructPacker(ostream &ostr,Indent &indent,string const &id,
-						  IDLTypedef const *activeTypedef = NULL) const {
+						  IDLTypedef const *activeTypedef) const {
 	ostr << indent << idlGetCast("_cstruct."+id,getTypeName()+"&") << " = "
 		 << id << ';' << endl;
 }
 
 void IDLSimpleType::writeCPPStructUnpacker(ostream &ostr,Indent &indent,string const &id,
-							IDLTypedef const *activeTypedef = NULL) const
+							IDLTypedef const *activeTypedef) const
 {
 	ostr << indent << id << " = "
 		 << idlGetCast("_cstruct."+id,"const " +getTypeName()+"&") << ';' << endl;
@@ -95,7 +95,7 @@
 
 // stub stuff
 void IDLSimpleType::getCPPStubDeclarator(IDL_param_attr attr,string const &id,string &typespec,string &dcl,
-						  IDLTypedef const *activeTypedef=NULL) const
+						  IDLTypedef const *activeTypedef) const
 {
 	typespec = activeTypedef ?
 		activeTypedef->getQualifiedCPPIdentifier() : getTypeName();
@@ -104,7 +104,7 @@
 }
 
 string IDLSimpleType::getCPPStubParameterTerm(IDL_param_attr attr,string const &id,
-							   IDLTypedef const *activeTypedef = NULL) const
+							   IDLTypedef const *activeTypedef) const
 {
 	string typespec,dcl;
 	getCSkelDeclarator(attr,"",typespec,dcl,activeTypedef);
@@ -114,14 +114,14 @@
 
 // stub return stuff
 void IDLSimpleType::getCPPStubReturnDeclarator(string const &id,string &typespec,string &dcl,
-								IDLTypedef const *activeTypedef = NULL) const
+								IDLTypedef const *activeTypedef) const
 {
 	typespec = activeTypedef ?
 		activeTypedef->getQualifiedCPPIdentifier() : getTypeName();
 	dcl = id;
 }
 void IDLSimpleType::writeCPPStubReturnPrepCode(ostream &ostr,Indent &indent,
-								IDLTypedef const *activeTypedef = NULL) const
+								IDLTypedef const *activeTypedef) const
 {
 	string typespec,dcl;
 	getCSkelReturnDeclarator("_retval",typespec,dcl,activeTypedef);
@@ -134,7 +134,7 @@
 }
 
 void IDLSimpleType::writeCPPStubReturnDemarshalCode(ostream &ostr,Indent &indent,
-									 IDLTypedef const *activeTypedef = NULL) const
+									 IDLTypedef const *activeTypedef) const
 {
 	string typespec,dcl;
 	getCPPStubReturnDeclarator("",typespec,dcl,activeTypedef);	
@@ -143,14 +143,14 @@
 
 // skel stuff
 void IDLSimpleType::getCSkelDeclarator(IDL_param_attr attr,string const &id,string &typespec,string &dcl,
-						IDLTypedef const *activeTypedef = NULL) const {
+						IDLTypedef const *activeTypedef) const {
 	typespec = attr == IDL_PARAM_IN ? "const " : "";
 	typespec += activeTypedef ? activeTypedef->getNSScopedCTypeName() : getNSScopedCTypeName();
 	dcl = attr == IDL_PARAM_IN ? id : "*"+id;
 }
 	
 string IDLSimpleType::getCPPSkelParameterTerm(IDL_param_attr attr,string const &id,
-							   IDLTypedef const *activeTypedef = NULL) const {
+							   IDLTypedef const *activeTypedef) const {
 	string typespec,dcl;
 	getCPPStubDeclarator(attr,"",typespec,dcl,activeTypedef);
 	string targetType = (attr == IDL_PARAM_IN ? "const " : "");
@@ -160,13 +160,13 @@
 
 // skel return stuff
 void IDLSimpleType::getCSkelReturnDeclarator(string const &id,string &typespec,string &dcl,
-							  IDLTypedef const *activeTypedef = NULL) const {
+							  IDLTypedef const *activeTypedef) const {
 	typespec = activeTypedef ? activeTypedef->getNSScopedCTypeName() : getNSScopedCTypeName();
 	dcl = id;
 }
 
 void IDLSimpleType::writeCPPSkelReturnPrepCode(ostream &ostr,Indent &indent,bool passthru,
-								IDLTypedef const *activeTypedef = NULL) const
+								IDLTypedef const *activeTypedef) const
 {
 	string typespec,dcl;
 	getCPPStubReturnDeclarator("_retval",typespec,dcl,activeTypedef);
@@ -174,12 +174,12 @@
 }
 
 string IDLSimpleType::getCPPSkelReturnAssignment(bool passthru,
-								  IDLTypedef const *activeTypedef = NULL) const
+								  IDLTypedef const *activeTypedef) const
 {
 	return "_retval = ";
 }
 void IDLSimpleType::writeCPPSkelReturnMarshalCode(ostream &ostr,Indent &indent,bool passthru,
-								   IDLTypedef const *activeTypedef = NULL) const
+								   IDLTypedef const *activeTypedef) const
 {
 
 	string typespec,dcl;
diff -ur ORBit2-cpp/src/idl-compiler/cpp/types/IDLStruct.cc ORBit2-cpp-new/src/idl-compiler/cpp/types/IDLStruct.cc
--- ORBit2-cpp/src/idl-compiler/cpp/types/IDLStruct.cc	2002-03-27 23:14:06.000000000 +0100
+++ ORBit2-cpp-new/src/idl-compiler/cpp/types/IDLStruct.cc	2002-08-24 12:32:58.000000000 +0200
@@ -67,7 +67,7 @@
 
 void
 IDLStruct::getCPPMemberDeclarator(string const &id,string &typespec,string &dcl,
-								  IDLTypedef const *activeTypedef = NULL) const {
+								  IDLTypedef const *activeTypedef) const {
 	typespec = getQualifiedCPPIdentifier(getRootScope());
 	dcl = id;
 };
@@ -75,7 +75,7 @@
 void
 IDLStruct::writeTypedef(ostream &ostr,Indent &indent,IDLCompilerState &state,
 						IDLElement &dest,IDLScope const &scope,
-						IDLTypedef const *activeTypedef = NULL) const {
+						IDLTypedef const *activeTypedef) const {
 	ostr
 	<< indent << "typedef " << getQualifiedCPPIdentifier()
 	<< " " << dest.getCPPIdentifier() << ";" << endl;
@@ -94,32 +94,32 @@
 
 void
 IDLStruct::getCPPStructCtorDeclarator(string const &id,string &typespec,string &dcl,
-									  IDLTypedef const *activeTypedef = NULL) const {
+									  IDLTypedef const *activeTypedef) const {
 	ORBITCPP_NYI("struct getCPPStructCtorDeclarator");
 }
 
 void
 IDLStruct::writeCPPStructCtor(ostream &ostr,Indent &indent,string const &id,
-							  IDLTypedef const *activeTypedef = NULL) const {
+							  IDLTypedef const *activeTypedef) const {
 	ORBITCPP_NYI("struct writeCPPStructCtor");
 }
 
 void
 IDLStruct::writeCPPStructPacker(ostream &ostr,Indent &indent,string const &id,
-								IDLTypedef const *activeTypedef = NULL) const {
+								IDLTypedef const *activeTypedef) const {
 	ORBITCPP_NYI("struct writeCPPStructPacker");
 }
 
 void
 IDLStruct::writeCPPStructUnpacker(ostream &ostr,Indent &indent,string const &id,
-								  IDLTypedef const *activeTypedef = NULL) const {
+								  IDLTypedef const *activeTypedef) const {
 	ORBITCPP_NYI("struct writeCPPStructUnpacker");
 }
 
 
 void
 IDLStruct::writeUnionReferents(ostream &ostr,Indent &indent, string const &id, string const &discriminatorVal,
-							IDLTypedef const *activeTypedef = NULL) const{
+							IDLTypedef const *activeTypedef) const{
 	ostr
 	<< indent << getQualifiedCPPIdentifier() << " &" << id << "() {" << endl;
 	ostr	
@@ -131,7 +131,7 @@
 
 
 void IDLStruct::getCPPStubDeclarator(IDL_param_attr attr,string const &id,string &typespec,string &dcl,
-									 IDLTypedef const *activeTypedef=NULL) const {
+									 IDLTypedef const *activeTypedef) const {
 	dcl = id;
 
 	string name = activeTypedef ?
@@ -153,7 +153,7 @@
 
 string
 IDLStruct::getCPPStubParameterTerm(IDL_param_attr attr,string const &id,
-								   IDLTypedef const *activeTypedef = NULL) const {
+								   IDLTypedef const *activeTypedef) const {
 
 	string typespec,dcl;
 	getCSkelDeclarator(attr,"",typespec,dcl,activeTypedef);
@@ -173,7 +173,7 @@
 
 void
 IDLStruct::getCPPStubReturnDeclarator(string const &id,string &typespec,string &dcl,
-									  IDLTypedef const *activeTypedef = NULL) const {
+									  IDLTypedef const *activeTypedef) const {
 	typespec = getQualifiedCPPIdentifier();
 	if(isVariableLength())
 		dcl = "*" + id;
@@ -183,7 +183,7 @@
 
 void
 IDLStruct::writeCPPStubReturnPrepCode(ostream &ostr,Indent &indent,
-									  IDLTypedef const *activeTypedef = NULL) const {
+									  IDLTypedef const *activeTypedef) const {
 
 	ostr
 	<< indent << getNSScopedCTypeName();
@@ -201,7 +201,7 @@
 
 void
 IDLStruct::writeCPPStubReturnDemarshalCode(ostream &ostr,Indent &indent,
-										   IDLTypedef const *activeTypedef = NULL) const {
+										   IDLTypedef const *activeTypedef) const {
 	ostr << indent << "return reinterpret_cast< " << getQualifiedCPPIdentifier();
 	if(isVariableLength())
 		ostr << "*";
@@ -213,7 +213,7 @@
 
 void
 IDLStruct::getCSkelDeclarator(IDL_param_attr attr,string const &id,string &typespec,string &dcl,
-							  IDLTypedef const *activeTypedef = NULL) const {
+							  IDLTypedef const *activeTypedef) const {
 	typespec = getNSScopedCTypeName();
 	
 	switch (attr) {
@@ -238,7 +238,7 @@
 
 void
 IDLStruct::writeCPPSkelDemarshalCode(IDL_param_attr attr,string const &id,ostream &ostr,Indent &indent,
-									 IDLTypedef const *activeTypedef = NULL) const {
+									 IDLTypedef const *activeTypedef) const {
 	// no demarshalling code required
 }
 
@@ -247,7 +247,7 @@
 
 string
 IDLStruct::getCPPSkelParameterTerm(IDL_param_attr attr,string const &id,
-								   IDLTypedef const *activeTypedef = NULL) const {
+								   IDLTypedef const *activeTypedef) const {
 	string typespec,dcl;
 	getCPPStubDeclarator(attr,"",typespec,dcl);
 
@@ -268,14 +268,14 @@
 
 void
 IDLStruct::writeCPPSkelMarshalCode(IDL_param_attr attr,string const &id,ostream &ostr,Indent &indent,
-								   IDLTypedef const *activeTypedef = NULL) const {
+								   IDLTypedef const *activeTypedef) const {
 	// no marshalling code required
 }
 
 
 void
 IDLStruct::getCSkelReturnDeclarator(string const &id,string &typespec,string &dcl,
-									IDLTypedef const *activeTypedef = NULL) const {
+									IDLTypedef const *activeTypedef) const {
 	typespec = getNSScopedCTypeName();
 	if (isVariableLength())
 		dcl = "*" + id;
@@ -285,7 +285,7 @@
 
 void
 IDLStruct::writeCPPSkelReturnPrepCode(ostream &ostr,Indent &indent,bool passthru,
-									  IDLTypedef const *activeTypedef = NULL) const {
+									  IDLTypedef const *activeTypedef) const {
 	ostr << indent << getQualifiedCPPIdentifier();
 	if (isVariableLength())
 		ostr << " *_retval = NULL;" << endl;
@@ -295,13 +295,13 @@
 
 string
 IDLStruct::getCPPSkelReturnAssignment(bool passthru,
-									  IDLTypedef const *activeTypedef = NULL) const {
+									  IDLTypedef const *activeTypedef) const {
 	return "_retval = ";		
 }
 
 void
 IDLStruct::writeCPPSkelReturnMarshalCode(ostream &ostr,Indent &indent,bool passthru,
-										 IDLTypedef const *activeTypedef = NULL) const {
+										 IDLTypedef const *activeTypedef) const {
 	ostr << indent << "return reinterpret_cast< "
 	<< getNSScopedCTypeName();
 
diff -ur ORBit2-cpp/src/idl-compiler/cpp/types/IDLType.cc ORBit2-cpp-new/src/idl-compiler/cpp/types/IDLType.cc
--- ORBit2-cpp/src/idl-compiler/cpp/types/IDLType.cc	2002-03-27 23:14:06.000000000 +0100
+++ ORBit2-cpp-new/src/idl-compiler/cpp/types/IDLType.cc	2002-08-24 12:33:43.000000000 +0200
@@ -43,7 +43,7 @@
 
 void
 IDLType::writeUnionAccessors(ostream &ostr,Indent &indent, string const &id, string const &discriminatorVal,
-									IDLTypedef const *activeTypedef = NULL) const{
+									IDLTypedef const *activeTypedef) const{
 	string typespec,dcl;
 	getCPPStubDeclarator(IDL_PARAM_IN,"",typespec,dcl,activeTypedef);
 	ostr
@@ -58,7 +58,7 @@
 
 void
 IDLType::writeUnionModifiers(ostream &ostr,Indent &indent, string const &id, string const &discriminatorVal,
-									IDLTypedef const *activeTypedef = NULL) const{
+									IDLTypedef const *activeTypedef) const{
 	string typespec,dcl;
 	getCPPStubDeclarator(IDL_PARAM_IN,"param",typespec,dcl,activeTypedef);
 	ostr
@@ -76,7 +76,7 @@
 
 void
 IDLType::writeUnionReferents(ostream &ostr,Indent &indent, string const &id, string const &discriminatorVal,
-							IDLTypedef const *activeTypedef = NULL) const{
+							IDLTypedef const *activeTypedef) const{
 }
 
 IDLType const &
diff -ur ORBit2-cpp/src/idl-compiler/cpp/types/IDLUnion.cc ORBit2-cpp-new/src/idl-compiler/cpp/types/IDLUnion.cc
--- ORBit2-cpp/src/idl-compiler/cpp/types/IDLUnion.cc	2002-03-12 00:57:22.000000000 +0100
+++ ORBit2-cpp-new/src/idl-compiler/cpp/types/IDLUnion.cc	2002-08-24 12:34:19.000000000 +0200
@@ -27,7 +27,7 @@
 #include "IDLUnion.hh"
 
 IDLUnion::IDLUnion(string const &id,IDL_tree node,
-				   IDLType const &discriminatorType, IDLScope *parentscope = NULL)
+				   IDLType const &discriminatorType, IDLScope *parentscope)
 	: IDLStruct(id,node,parentscope),m_discriminatorType(discriminatorType) {
 }
 
diff -ur ORBit2-cpp/src/orb-cpp/orbitcpp_object.cc ORBit2-cpp-new/src/orb-cpp/orbitcpp_object.cc
--- ORBit2-cpp/src/orb-cpp/orbitcpp_object.cc	2002-04-16 19:02:11.000000000 +0200
+++ ORBit2-cpp-new/src/orb-cpp/orbitcpp_object.cc	2002-08-24 12:44:31.000000000 +0200
@@ -46,7 +46,7 @@
 {
 }
 
-CORBA::Object::Object(CORBA_Object cobject, bool take_copy = true)
+CORBA::Object::Object(CORBA_Object cobject, bool take_copy)
 {
 	if (take_copy)
 	{
diff -ur ORBit2-cpp/src/orb-cpp/orbitcpp_typecode.cc ORBit2-cpp-new/src/orb-cpp/orbitcpp_typecode.cc
--- ORBit2-cpp/src/orb-cpp/orbitcpp_typecode.cc	2002-04-16 19:02:11.000000000 +0200
+++ ORBit2-cpp-new/src/orb-cpp/orbitcpp_typecode.cc	2002-08-24 12:45:22.000000000 +0200
@@ -322,7 +322,7 @@
 	return m_target;
 }
 
-CORBA::TypeCode::TypeCode(CORBA_TypeCode cobject, bool take_copy = true)
+CORBA::TypeCode::TypeCode(CORBA_TypeCode cobject, bool take_copy)
 {
 	//TODO: take_copy?
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]