Eliminate use of __attribute__

Ideally this would be standard C++, but here I've settled for things that should be supported by both clang and VS/cl.exe:
- Deprecated attribute retained, but now uses __declspec syntax
- Packed attribute replaced with pragma pack, except one instance where it unnecessary
- Aligned attribute replaced with explicit padding bytes inserted in the structs where needed
- Unused attribute simply removed (though where possible, the unused entities were also removed)
This commit is contained in:
2014-12-02 13:07:11 -05:00
parent d61c0a5c1e
commit 03c64ebd7b
20 changed files with 545 additions and 83 deletions

View File

@@ -66,7 +66,7 @@ public:
char sign_strs[8][256];
bool special_spot[48][48];
char(& out_strs(short i))[256] __attribute__((deprecated));
__declspec(deprecated) char(& out_strs(short i))[256];
cOutdoors();
cOutdoors& operator = (legacy::outdoor_record_type& old);
};

View File

@@ -100,7 +100,7 @@ public:
cOutdoors* outdoors;
cTown* towns;
char(& scen_strs(short i))[256] __attribute__((deprecated));
__declspec(deprecated) char(& scen_strs(short i))[256];
cScenario& operator = (legacy::scenario_data_type& old);
void append(legacy::scen_item_data_type& old);
void writeTo(std::ostream& file);

View File

@@ -99,7 +99,7 @@ public:
char comment[3][256];
char spec_strs[100][256];
char sign_strs[20][256];
char(& town_strs(short i))[256] __attribute__((deprecated));
__declspec(deprecated) char(& town_strs(short i))[256];
cSpeech talking;
virtual ~cTown(){}

View File

@@ -56,9 +56,9 @@ public:
void append(unsigned char(& old_sfx)[64][64], unsigned char(& old_misc_i)[64][64]);
void append(legacy::big_tr_type& old);
unsigned char explored(char x,char y) const __attribute__((deprecated));
unsigned char misc_i(char x, char y) const __attribute__((deprecated));
unsigned char sfx(char x, char y) const __attribute__((deprecated));
__declspec(deprecated) unsigned char explored(char x,char y) const;
__declspec(deprecated) unsigned char misc_i(char x, char y) const;
__declspec(deprecated) unsigned char sfx(char x, char y) const;
cTown* operator -> ();
cCurTown();