r3180 compile error

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Post Reply
User avatar
Enjay
 
 
Posts: 27115
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

r3180 compile error

Post by Enjay »

Code: Select all

2>music_mus_midiout.cpp
2>.\src\sound\music_mus_midiout.cpp(328) : error C2782: 'const T MIN(const T,const T)' : template parameter 'T' is ambiguous
2>        src\templates.h(159) : see declaration of 'MIN'
2>        could be 'int'
2>        or 'BYTE'
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: r3180 compile error

Post by Gez »

What was wrong with using if (mid2 & 0x80) mid2 = 0x7F; instead of this templated clamping?
Edward-san
Posts: 1774
Joined: Sat Oct 17, 2009 9:40 am

Re: r3180 compile error

Post by Edward-san »

Replacing "MIN(mid2, 0x7F))" with "MIN((int)mid2, 0x7F))" it lets compile for me.
User avatar
randi
Site Admin
Posts: 7749
Joined: Wed Jul 09, 2003 10:30 pm
Contact:

Re: r3180 compile error

Post by randi »

Gez wrote:What was wrong with using if (mid2 & 0x80) mid2 = 0x7F; instead of this templated clamping?
You clamped the processed value rather than the original from the MUS file, so I had to move it and figured that would be the simplest thing to do.
User avatar
Enjay
 
 
Posts: 27115
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: r3180 compile error

Post by Enjay »

Changelog wrote:- Oh my goodness, maybe I need to try compiling things before committing them!
:lol:

Well, it definitely compiles now. :)
Post Reply

Return to “Closed Bugs [GZDoom]”