diff --git a/code/_wsproto.cpp b/code/_wsproto.cpp index 2514d980a..3762adf9a 100644 --- a/code/_wsproto.cpp +++ b/code/_wsproto.cpp @@ -31,7 +31,7 @@ #include "always.h" -#include "_WSProto.h" +#include "_wsproto.h" WinsockInterfaceClass *PacketTransport = 0; //The object for interfacing with Winsock diff --git a/code/init.cpp b/code/init.cpp index c4543ac6b..b876c495e 100644 --- a/code/init.cpp +++ b/code/init.cpp @@ -204,7 +204,7 @@ struct ChooseCampaignStruct { ** Enable the set of limited cheat key options. */ #ifdef _DEBUG -#define PARM_PLAYTEST 0xF7DDC227 // "PLAYTEST" +#define PARM_PLAYTEST static_cast(0xF7DDC227u) // "PLAYTEST" #endif /* @@ -212,11 +212,11 @@ struct ChooseCampaignStruct { */ #ifdef _DEBUG #ifndef PARM_PLAYTEST -#define PARM_PLAYTEST 0xF7DDC227 // "PLAYTEST" +#define PARM_PLAYTEST static_cast(0xF7DDC227u) // "PLAYTEST" #endif #endif -#define PARM_INSTALL 0xD95C68A2 // "FROMINSTALL" +#define PARM_INSTALL static_cast(0xD95C68A2u) // "FROMINSTALL" /**************************************** diff --git a/code/int.cpp b/code/int.cpp index 04b0a0836..de1734420 100644 --- a/code/int.cpp +++ b/code/int.cpp @@ -35,7 +35,7 @@ #include "mpmath.h" -int bignum::Error = 0; -bool bignum::Carry = false; -bool bignum::Borrow = false; -bignum bignum::Remainder; +template<> int Int::Error = 0; +template<> bool Int::Carry = false; +template<> bool Int::Borrow = false; +template<> Int Int::Remainder{}; diff --git a/code/int.h b/code/int.h index b258e61c9..1a22d621b 100644 --- a/code/int.h +++ b/code/int.h @@ -173,7 +173,7 @@ class Int { // Friend helper functions. template - friend T Generate_Prime(Straw & rng, int pbits, T const * = 0); + friend T Generate_Prime(Straw & rng, int pbits, T const *); template friend T Gcd(const Int & a, const T & b); // friend bool NextPrime(Int & p, const Int & max, bool blumInt=false); diff --git a/code/list.h b/code/list.h index e2b6dfbd8..2897e7cf8 100644 --- a/code/list.h +++ b/code/list.h @@ -34,6 +34,7 @@ #include "control.h" #include "dialog.h" +#include "font.h" #include "shapebtn.h" #include "slider.h" #include "vector.h" diff --git a/code/lzo1x_c.cpp b/code/lzo1x_c.cpp index ebcf7dd7f..d612da89a 100644 --- a/code/lzo1x_c.cpp +++ b/code/lzo1x_c.cpp @@ -121,7 +121,7 @@ static int do_compress(const lzo_byte * in, lzo_uint in_len, lzo_voidp wrkmem ) { - register const lzo_byte *ip; + const lzo_byte *ip; lzo_uint dv; lzo_byte *op; const lzo_byte * const in_end = in + in_len; @@ -139,7 +139,7 @@ static int do_compress(const lzo_byte * in, lzo_uint in_len, DVAL_NEXT(dv,ip); UPDATE_D(dict,cycle,dv,ip); ip++; for (;;) { - register const lzo_byte *m_pos; + const lzo_byte *m_pos; lzo_uint m_len; lzo_ptrdiff_t m_off; lzo_uint lit; @@ -197,7 +197,7 @@ static int do_compress(const lzo_byte * in, lzo_uint in_len, /* store current literal run */ if (lit > 0) { - register lzo_uint t = lit; + lzo_uint t = lit; if (t <= 3) { assert(op - 2 > out); @@ -206,7 +206,7 @@ static int do_compress(const lzo_byte * in, lzo_uint in_len, if (t <= 18) { *op++ = LZO_BYTE(t - 3); } else { - register lzo_uint tt = t - 18; + lzo_uint tt = t - 18; *op++ = 0; while (tt > 255) { @@ -304,7 +304,7 @@ static int do_compress(const lzo_byte * in, lzo_uint in_len, /* store final literal run */ if (in_end - ii > 0) { - register lzo_uint t = in_end - ii; + lzo_uint t = in_end - ii; if (op == out && t <= 238) { *op++ = LZO_BYTE(17 + t); @@ -315,7 +315,7 @@ static int do_compress(const lzo_byte * in, lzo_uint in_len, if (t <= 18) { *op++ = LZO_BYTE(t - 3); } else { - register lzo_uint tt = t - 18; + lzo_uint tt = t - 18; *op++ = 0; while (tt > 255) { diff --git a/code/lzo1x_d.cpp b/code/lzo1x_d.cpp index 502f2a37c..d25d39654 100644 --- a/code/lzo1x_d.cpp +++ b/code/lzo1x_d.cpp @@ -95,10 +95,10 @@ int lzo1x_decompress ( const lzo_byte * in, lzo_uint in_len, lzo_byte * out, lzo_uint * out_len, lzo_voidp ) { - register lzo_byte *op; - register const lzo_byte *ip; - register lzo_uint t; - register const lzo_byte *m_pos; + lzo_byte *op; + const lzo_byte *ip; + lzo_uint t; + const lzo_byte *m_pos; const lzo_byte * const ip_end = in + in_len; *out_len = 0; diff --git a/code/scenario.cpp b/code/scenario.cpp index f2b91b737..b1a3a2721 100644 --- a/code/scenario.cpp +++ b/code/scenario.cpp @@ -926,7 +926,7 @@ void Clear_Scenario(void) Map.ZoneConnections.Clear(); - TagClass::Init(); + TagClass::Delete_All(); for (index = 0; index < ARRAY_SIZE(Scen->GlobalFlags); index++) { Scen->Set_Global_To(index, false); diff --git a/code/tag.cpp b/code/tag.cpp index 2183dcd76..1fc370b3f 100644 --- a/code/tag.cpp +++ b/code/tag.cpp @@ -333,7 +333,7 @@ void TagClass::Set_Position(Cell cell) /// This routine is called when a scenario is torn down so that no tag from the previous /// mission survives into the next one. /// -void TagClass::Init(void) +void TagClass::Delete_All(void) { while (Tags.Count() > 0) { delete Tags[0]; diff --git a/code/tag.h b/code/tag.h index 9567f1abf..fe24ffe53 100644 --- a/code/tag.h +++ b/code/tag.h @@ -59,7 +59,7 @@ class TagClass : public AbstractClass static void All_Timer_Global_Reset(int global); static void All_Timer_Local_Reset(int local); - static void Init(void); + static void Delete_All(void); void Link(TriggerClass *trigger); bool Unlink(TriggerClass *trigger); diff --git a/code/vqalib/unvq.cpp b/code/vqalib/unvq.cpp index 4eb83ef90..f218874ef 100644 --- a/code/vqalib/unvq.cpp +++ b/code/vqalib/unvq.cpp @@ -956,7 +956,7 @@ void __cdecl UnVQ2_C0_4x4_TRANS(unsigned char * codebook, unsigned char * pointe { uint8_t * dst = (uint8_t *)buffer; uint8_t * row_base = (uint8_t *)buffer; - register uint16_t * src = (uint16_t *)pointers; + uint16_t * src = (uint16_t *)pointers; uint32_t blocks = 0; uint32_t total = blocksperrow * numrows; @@ -1222,7 +1222,7 @@ void __cdecl UnVQ2_C0_4x4_KEY(unsigned char * codebook, unsigned char * pointers { uint8_t * dst = (uint8_t *)buffer; uint8_t * row_base = (uint8_t *)buffer; - register uint16_t * src = (uint16_t *)pointers; + uint16_t * src = (uint16_t *)pointers; uint32_t blocks = 0; uint32_t total = numrows * blocksperrow; @@ -2010,7 +2010,7 @@ void __cdecl UnVQ2_C0_4x2_KEY(unsigned char * codebook, unsigned char * pointers { uint8_t * dst = (uint8_t *)buffer; uint8_t * row_base = (uint8_t *)buffer; - register uint16_t * src = (uint16_t *)pointers; + uint16_t * src = (uint16_t *)pointers; uint32_t blocks = 0; uint32_t total = numrows * blocksperrow; diff --git a/code/vqalib/vqapalette.h b/code/vqalib/vqapalette.h index 856c58f1e..136e2eb0d 100644 --- a/code/vqalib/vqapalette.h +++ b/code/vqalib/vqapalette.h @@ -39,10 +39,10 @@ extern "C" { #endif -void cdecl SetPalette(unsigned char *palette,long numbytes,unsigned long slowpal); -void cdecl ReadPalette(void *palette); -void cdecl SetDAC(long color, long red, long green, long blue); -void cdecl TranslatePalette(void *pal24, void *pal15, long numbytes); +void __cdecl SetPalette(unsigned char *palette,long numbytes,unsigned long slowpal); +void __cdecl ReadPalette(void *palette); +void __cdecl SetDAC(long color, long red, long green, long blue); +void __cdecl TranslatePalette(void *pal24, void *pal15, long numbytes); #ifdef __cplusplus } diff --git a/code/wsproto.h b/code/wsproto.h index ce2e02e72..cfcd4336b 100644 --- a/code/wsproto.h +++ b/code/wsproto.h @@ -31,7 +31,7 @@ #pragma once -#include "_WSProto.h" +#include "_wsproto.h" #include "ipxaddr.h" #include "vector.h"