bug-ddd
[Top][All Lists]
Advanced

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

Re: ddd/MString.h problems in 3.3 with Solaris C++ compiler, liberty ins


From: Albert Chin-A-Young
Subject: Re: ddd/MString.h problems in 3.3 with Solaris C++ compiler, liberty install problems
Date: Sat, 3 Mar 2001 11:04:03 -0600
User-agent: Mutt/1.1.12i

On Fri, Feb 23, 2001 at 02:45:22PM +0000, Arnaud Desitter wrote:
> > I'm not sure about this: the Sun CC message explicitly stated that the
> > `text' parameter was erroneous.  
> > 
> > Also, this change would have to be applied to the next N constructors
> > as well (which didn't report any problems).
> > 
> > Finally, it risks to introduce new errors on systems where
> > `XmStringCharSet' is not defined as a `char *' or `const char *'.
> > 
> 
> My mistake ! To redeem myself, I provide a patch below that fixes
> the problem. This may be due to an weird interaction between operator
> overloading and default parameter.

Ok, the patch below works! Note that the patch is reversed.

> --- ddd-3.3/ddd/MString.h       Fri Feb 23 14:28:34 2001
> +++ ddd-3.3-1/ddd/MString.h     Mon Dec 11 12:21:47 2000
> @@ -52,12 +52,7 @@
>  
>  public:
>      // Constructors
> -    MString():
> -       _mstring(XmStringCreateLtoR((char*)"", MSTRING_DEFAULT_CHARSET) )
> -    {
> -       assert(OK());
> -    }
> -    MString(const char *text ,
> +    MString(const char *text = "",
>             XmStringCharSet charset = MSTRING_DEFAULT_CHARSET):
>         _mstring(text ? XmStringCreateLtoR((char *)text, charset) : 0)
>      {

-- 
albert chin (china@thewrittenword.com)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]