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

Rainer M. Canavan scumm at canavan.de
Mon Mar 2 22:51:10 CET 2009


Max Horn <max at quendi.de> wrote:
> Hi Rainer,
> 
> thank you for your submission, it is much appreciated. Though in the  
> future, you may want to submit this via our patch tracker (linked from  
> e.g. scummvm.org), to make sure the patch is not lost / forgotten. :-)

I was mostly interested in feedback about the first patch so I figured
the list would be the right place to turn to.

> Am 01.03.2009 um 16:04 schrieb Rainer M. Canavan:
> 
> > Hi,
> >
> > to compile the branch-0-13-0, I had to make some minor adjustments
> > to common/list.h, common/hashmap.h and engines/groovie/graphics.cpp.
> > If those changes don't break builds with gcc and other compilers,
> > I'd appreciate if they could be appiled to branch and trunk.
> 
> The first two (in common/) do break compilation on GCC, and they are  
> semantically incorrect. So sorry, but no way they are going to be  
> added like that. Explanation: They add forward declarations for  
> classes (resp. class tempaltes) that do not exist. I.e. there is no  
> class Iterator in the global namespace, nor in namespace Common.  
> Rather, the class's full name is Common::List::Iterator. Same for  
> IteratorImpl in hashmap.h

> 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. 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;
                                                       ^
          A template was detected during header processing.
            instantiation of class
                      "Common::List<Common::SearchSet::Node>::Iterator<Common::
                      SearchSet::Node>" at line 252
            instantiation of "Common::List<Common::SearchSet::Node>::iterator
                      Common::List<Common::SearchSet::Node>::begin()" at line
                      244
            instantiation of
                      "void Common::List<Common::SearchSet::Node>::clear()" at
                      line 146
            instantiation of "Common::List<Common::SearchSet::Node>::~List()"
                      at line 153 of "./common/archive.h"
            instantiation of "Common::List<Common::SearchSet::Node>::~List()"
                      at line 153 of "./common/archive.h"

[...]
> >
> > 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.
Is there any plan when the getDevices() interface is going to be
used?

regards,

rainer




More information about the Scummvm-devel mailing list