You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xerces.apache.org by Christian Johannes Charbula <ch...@racon-linz.at> on 2007/10/05 10:36:40 UTC
TraverseSchema::checkContent
hi,
is the parameter processAnnot from the function
TraverseSchema::checkContent const or not const?
TraverseSchema.hpp (261):
DOMElement* checkContent(const DOMElement* const rootElem,
DOMElement* const contentElem,
const bool isEmpty, bool processAnnot =
true);
TraverseSchema.hpp (4837):
DOMElement* TraverseSchema::checkContent( const DOMElement* const rootElem
, DOMElement* const contentElem
, const bool isEmpty
, const bool processAnnot)
{
...
}
i made it const in my local copy, but i don't know if i should check
this in. maybe some one can take a look at it.
regards,
christian
Re: TraverseSchema::checkContent
Posted by Christian Johannes Charbula <ch...@racon-linz.at>.
Boris Kolpackov schrieb:
> I think it is fine to leave it as is (that is no const in the interface
> and const in the implementation).
i'm sure you are right, but some compilers (eg. HP C++ V7.3-009 for
OpenVMS Alpha 7.3-2) has problems with this.
Re: TraverseSchema::checkContent
Posted by Boris Kolpackov <bo...@codesynthesis.com>.
Hi Christian,
Christian Johannes Charbula <ch...@racon-linz.at> writes:
> is the parameter processAnnot from the function
> TraverseSchema::checkContent const or not const?
It is not necessary in the interface (.hpp) since the caller does
not care whether the implementation will change the processAnnot
variable or not. In the implementation (.cpp) it can be made const
if the implementation does not intend to modify it. But most people,
include myself, don't bother with things like this.
> i made it const in my local copy, but i don't know if i should check
> this in.
I think it is fine to leave it as is (that is no const in the interface
and const in the implementation).
Boris
--
Boris Kolpackov
Code Synthesis Tools CC
http://www.codesynthesis.com
Open-Source, Cross-Platform C++ XML Data Binding