make static table
Fix templates not inlining with gcc Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@1470
This commit is contained in:
parent
96cbf4d6a2
commit
5ad16d2037
3 changed files with 12 additions and 6 deletions
|
@ -53,12 +53,12 @@ static void Normal(Bit8u * src,Bitu x,Bitu y,Bitu _dx,Bitu _dy) {
|
|||
}
|
||||
|
||||
|
||||
RENDER_Part_Handler Normal_SINGLE_8[4]={
|
||||
static RENDER_Part_Handler Normal_SINGLE_8[4]={
|
||||
Normal<8,8 ,false>,Normal<8,16,false>,
|
||||
Normal<8,24,false>,Normal<8,32,false>,
|
||||
};
|
||||
|
||||
RENDER_Part_Handler Normal_DOUBLE_8[4]={
|
||||
static RENDER_Part_Handler Normal_DOUBLE_8[4]={
|
||||
Normal<8,8 ,true>,Normal<8,16,true>,
|
||||
Normal<8,24,true>,Normal<8,32,true>,
|
||||
};
|
||||
};
|
||||
|
|
|
@ -69,7 +69,7 @@ static void AdvMame2x(Bit8u * src,Bitu x,Bitu y,Bitu _dx,Bitu _dy) {
|
|||
}
|
||||
|
||||
|
||||
RENDER_Part_Handler AdvMame2x_8_Table[4]={
|
||||
static RENDER_Part_Handler AdvMame2x_8_Table[4]={
|
||||
AdvMame2x<8,8>,AdvMame2x<8,16>,AdvMame2x<8,24>,AdvMame2x<8,32>
|
||||
};
|
||||
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
template <Bitu dbpp>
|
||||
static INLINE void AddDst(Bit8u * & dst,Bitu val) {
|
||||
#ifdef __GNUC__
|
||||
template <Bitu dbpp> static INLINE void AddDst(Bit8u * & dst,Bitu val) __attribute__ ((always_inline));
|
||||
template <Bitu bpp> static INLINE Bitu LineSize(Bitu pixels) __attribute__ ((always_inline));
|
||||
template <Bitu sbpp> static INLINE Bitu LoadSrc(Bit8u * & src) __attribute__ ((always_inline));
|
||||
template <Bitu sbpp,Bitu dbpp> static INLINE Bitu ConvBPP(Bitu val) __attribute__ ((always_inline));
|
||||
#endif
|
||||
|
||||
template <Bitu dbpp> static INLINE void AddDst(Bit8u * & dst,Bitu val) {
|
||||
switch (dbpp) {
|
||||
case 8: *(Bit8u*)dst=val;dst+=1;break;
|
||||
case 16:*(Bit16u*)dst=val;dst+=2;break;
|
||||
|
|
Loading…
Add table
Reference in a new issue