[omniORB] Patch: removed const_cast warnings

matejkenda@volja.net matejkenda@volja.net
Thu Jan 9 18:04:01 2003


------=_rE+2ToM)u)Slt6Q9N1.N6lerMQeL3s3Ge?hOe4ym7uCUUmuF/Ihy2ac+g'JR
Content-Type: text/plain; charset=iso-8859-2
Content-Transfer-Encoding: 8bit

Hi Duncan,

Here goes the new patch that uses a macro to make header files more readable.

Regards,

Matej

> -----Original Message-----
> From: matejkenda@volja.net [mailto:matejkenda@volja.net]
> Subject: Re: [omniORB] Patch: removed const_cast warnings
>
> Gary,
>
> Thanks for the tip. I followed the implementation that was
> already there, but I
> will try to revert all similar casts to use a macro.
>
> >    You might consider using a macro, instead. Something like:
> >
> > #ifdef HAS_Cplusplus_const_cast
> > #define CONST_CAST(t,v) const_cast<t>(v)
> > #else
> > #define CONST_CAST(t,v) (t)v
> > #endif
> >



------=_rE+2ToM)u)Slt6Q9N1.N6lerMQeL3s3Ge?hOe4ym7uCUUmuF/Ihy2ac+g'JR
Content-Type: application/octet-stream; name="omniORB4_const_cast.diff"
Content-Disposition: attachment; filename="omniORB4_const_cast.diff"
Content-Transfer-Encoding: base64

ZGlmZiAtLXVuaWZpZWQgLWIgLUIgLi4vLi4vb21uaU9SQi00LjAuMC9pbmNsdWRlL29tbmlPUkI0
L2NhbGxEZXNjcmlwdG9yLmggb21uaU9SQjQvaW5jbHVkZS9vbW5pT1JCNC9jYWxsRGVzY3JpcHRv
ci5oCi0tLSAuLi8uLi9vbW5pT1JCLTQuMC4wL2luY2x1ZGUvb21uaU9SQjQvY2FsbERlc2NyaXB0
b3IuaAkyMDAxLTExLTA2IDE2OjQxOjM1LjAwMDAwMDAwMCArMDEwMAorKysgb21uaU9SQjQvaW5j
bHVkZS9vbW5pT1JCNC9jYWxsRGVzY3JpcHRvci5oCTIwMDMtMDEtMDkgMTc6NTU6MDAuMDAwMDAw
MDAwICswMTAwCkBAIC0yODAsNyArMjgwLDcgQEAKIAkJICAgICBzaXplX3Qgb3BsZW4sIGNvbnN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