From: F J Franklin (F.J.Franklin@sheffield.ac.uk)
Date: Mon Dec 09 2002 - 08:48:00 EST
e.g.
const XAP_StringSet * pSS = m_pApp->getStringSet ();
windowMain = abiDialogNew ( "encoding dialog", true,
pSS->getValueUTF8(XAP_STRING_ID_DLG_UENC_EncTitle).c_str() ) ;
where
UT_String XAP_StringSet::getValueUTF8(XAP_String_Id id) const
{
...
return UT_String(getValue(id));
}
and
virtual const XML_Char * getValue(XAP_String_Id id) const = 0;
So, quite apart from the use of UT_String, which an apostle has marked
as a FIXME, we have an intermediate & redundate step whereby a
"const XML_Char *" is converted via UT_String into "const char *".
Is there any reason why we can't replace all
pSS->getValueUTF8(XAP_STRING_ID_DLG_UENC_EncTitle).c_str()
by
(const char *) pSS->getValue (XAP_STRING_ID_DLG_UENC_EncTitle)
?
Bemused, Frank
Francis James Franklin
F.J.Franklin@shef.ac.uk
`Medium atomic weights are available: Gold, Lead, Copper, Jet, Diamond,
Radium, Sapphire, Silver and Steel.
`Sapphire and Steel have been assigned...'
This archive was generated by hypermail 2.1.4 : Mon Dec 09 2002 - 08:49:55 EST