[Uml-devel] Re: What is #warning?

Jens Krüger jens_krueger at frm2.tu-muenchen.de
Tue Oct 1 00:58:04 UTC 2002


Hi Jonathan, 
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; //this is to prevent document becoming modified when 
activating a view

        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.

Regards 

Jens


Am Dienstag, 1. Oktober 2002 03:37 schrieb Jonathan Riddell:
> > In uml/umldoc.cpp on line 1208 I can see:
> >
> > #warning this makes no sense?
> >
> > What is this? I have never seen this kind of preprocessor thing before.
> > Is it to force to produce a warning during compilation?
>
> Yes, it just displays the message when compiling.
>
> In that case it does make sence to me so I'll remove the #warning unless
> anyone can tell me why it doesn't make sence.
>
> Jonathan Riddell
>
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Uml-devel mailing list
> umbrello-devel at kde.org
> https://mail.kde.org/mailman/listinfo/umbrello-devel





More information about the umbrello-devel mailing list