[Scummvm-devel] templates, visuals, getDevices()

Max Horn max at quendi.de
Tue Mar 3 02:24:44 CET 2009


Am 02.03.2009 um 16:51 schrieb Rainer M. Canavan:

> Max Horn <max at quendi.de> wrote:
>
[...]

>> Maybe if you tell us what errors you get, with which compiler, we can
>
> I was aware of the proper class names, but those forward declatations
> were the only way I've found so far that made the compiler in
> question (SGI MIPSpro) happy.

My first thought is: Gee, yet another buggy compiler :-). One approach  
to solve this problem is to switch to GCC, e.g. maybe this one works: <http://freeware.sgi.com/cd-2/relnotes/gcc.html 
 > or the 4.2.3 gcc provided by pkgsrc: <http://mail-index.netbsd.org/pkgsrc-users/2008/02/19/msg000417.html 
 >.


> With the unchanged file, it complains:
> cc-3239 CC: ERROR File = ./common/list.h, Line = 57
>  Template nesting depth does not match the previous declaration of  
> class
>          template "Common::List<Common::SearchSet::Node>::Iterator".
>
>                template<class T> friend class Iterator;
>                                                       ^

This seems to be a bug in the template handling logic of the compiler.  
If you can find a way to workaround it w/o breaking GCC, we could  
consider it (I would help searching one, but w/o having access to  
MIPSPro, that's difficult. OTOH, it is very easy to get access to some  
machine running GCC... ;).

We could also use your patch, but surrounded with #ifdef MIPSPRO /  
#endif (using the appropriate flags to detect your compiler). That's  
quite ugly, though, but might be the only way to support this compiler.


>>>
>>> The second patch is an attempt to populate the getDevices()
>>> function of the dmedia midi driver.
>>
>> Somebody else will have to comment on that one, as I don't even know
>> what "dmedia" is :)
>
> That one's mine actually, it's the IRIX midi driver. Just apply it.

Aha. Well, then "someone" should apply. Though the codes doesn't quite  
comply to our code formatting guidelines.

If nobody applies it, submit it via the patch tracker, then I'll do it  
during the weekend.


> Is there any plan when the getDevices() interface is going to be
> used?

No plans. It's one of the many "when someone does it" things. Might be  
never, might be tomorrow.

Max.




More information about the Scummvm-devel mailing list