[Uml-devel] Re: What is #warning?
Jonathan Riddell
jr at jriddell.org
Tue Oct 1 11:15:55 UTC 2002
> I introduced this warning because I wasn't sure about the implementation of
> the following code
>
> bool UMLDoc::activateView ( int viewID ) {
> bool status = true;
> loading = true;
> for(UMLView *v = viewsNotActivated.first(); v; v =
> viewsNotActivated.next() )
> if ( v->getID() == viewID) {
> status = v->ActivateAfterSerialize();
> viewsNotActivated.remove();
> loading = false;
> return status;
> }
> #warning this makes no sense ?
> loading = false;
> return status;
> }
>
> the loading variable is allways set to false in case of a return.
> I set this warning only for remembering to solve this question. If you are
> sure that the implementation is correct you can remove this warning.
Well I think that no matter where it returns from it will always be the
case that the document is no long loading.
I don't know if it's technicly possible to alter the diagram in the middle
of this method (which this variable should stop). I think it might be, in
which case the code is worth keeping.
Jonathan Riddell
More information about the umbrello-devel
mailing list