On Tue, Sep 27, 2011 at 3:55 PM, Rolf Eike Beer <e...@sf-mail.de> wrote: >> From: Nicolas Despres <nicolas.desp...@gmail.com> >> >> Make it a static method instead of an array. It is safer for the >> type checking and if we add a new target type we will be warned to add >> a case to the switch. > >> + case cmTarget::UNKNOWN_LIBRARY: >> + return "UNKNOWN_LIBRARY"; >> + // break; /* unreachable */ >> + } >> + return 0; >> +} > > Shouldn't this spit out a warning or error message?
Frankly I don't know. I just refactor the code and kept the same original behavior. -- Nicolas Desprès -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers