Added include guards to all class headers.
Removed unnecessary or potentially harmful compiler flags. Added alignment attribute to all old struct members. Removed some unused variables. Made some switch statements handle all or more cases. Removed using declarations in favor of fully qualified names. Fixed a couple of assignments in conditionals that should have been comparisons. Eliminated linker warnings by restoring default linking of standard libraries. Fixed some comparisons between signed and unsigned integers. Note: No testing has been done, in particular of old file I/O. This should be checked for regression caused by alteration of old struct definitions. git-svn-id: http://openexile.googlecode.com/svn/trunk@63 4ebdad44-0ea0-11de-aab3-ff745001d230
This commit is contained in:
@@ -6,6 +6,11 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef PC_H
|
||||
#define PC_H
|
||||
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
|
||||
namespace legacy { struct pc_record_type; };
|
||||
|
||||
@@ -33,7 +38,7 @@ enum eMainStatus {
|
||||
class cPlayer {
|
||||
public:
|
||||
eMainStatus main_status;
|
||||
string name;
|
||||
std::string name;
|
||||
short skills[30];
|
||||
unsigned short max_health;
|
||||
short cur_health;
|
||||
@@ -60,11 +65,13 @@ public:
|
||||
cPlayer();
|
||||
cPlayer(long key,short slot);
|
||||
short get_tnl();
|
||||
void writeTo(ostream& file);
|
||||
void readFrom(istream& file);
|
||||
void writeTo(std::ostream& file);
|
||||
void readFrom(std::istream& file);
|
||||
};
|
||||
|
||||
void operator += (eMainStatus& stat, eMainStatus othr);
|
||||
void operator -= (eMainStatus& stat, eMainStatus othr);
|
||||
ostream& operator << (ostream& out, eMainStatus& e);
|
||||
istream& operator >> (istream& in, eMainStatus& e);
|
||||
std::ostream& operator << (std::ostream& out, eMainStatus& e);
|
||||
std::istream& operator >> (std::istream& in, eMainStatus& e);
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user