Cleanup MSVC warnings and deprecated C++ exception stuff

This commit is contained in:
Charles J. Cliffe
2016-06-01 19:42:34 -04:00
parent c1863d9319
commit 688181e566
26 changed files with 267 additions and 267 deletions
+11 -11
View File
@@ -164,7 +164,7 @@ DataElementSetNumericVectorDef(DATA_DOUBLE_VECTOR, double)
DataElementSetNumericVectorDef(DATA_LONGDOUBLE_VECTOR, long double)
#define DataElementGetNumericDef(enumtype, datatype, ...) void DataElement::get(datatype& val_out) throw (DataTypeMismatchException) { \
#define DataElementGetNumericDef(enumtype, datatype, ...) void DataElement::get(datatype& val_out) { \
if (!data_type) \
return; \
int _compat[] = {__VA_ARGS__}; \
@@ -207,7 +207,7 @@ DataElementGetNumericDef(DATA_LONG, long, DATA_CHAR, DATA_UCHAR, DATA_UINT, DATA
#define DataElementGetFloatingPointDef(enumtype, datatype, ...) void DataElement::get(datatype& val_out) throw (DataTypeMismatchException) { \
#define DataElementGetFloatingPointDef(enumtype, datatype, ...) void DataElement::get(datatype& val_out) { \
if (!data_type) \
return; \
int _compat[] = {__VA_ARGS__}; \
@@ -250,14 +250,14 @@ DataElementGetFloatingPointDef(DATA_FLOAT, float, DATA_DOUBLE, DATA_CHAR, DATA_U
DataElementGetFloatingPointDef(DATA_DOUBLE, double, DATA_FLOAT, DATA_CHAR, DATA_UCHAR, DATA_UINT, DATA_ULONG, DATA_LONGLONG, DATA_LONGDOUBLE, DATA_INT,
DATA_LONG)
void DataElement::get(char **data_in) throw (DataTypeMismatchException) {
void DataElement::get(char **data_in) {
if (data_type != DATA_VOID)
throw(new DataTypeMismatchException("Type mismatch, not a CHAR*"));
*data_in = new char[data_size];
memcpy(*data_in, data_val, data_size);
}
void DataElement::get(string &str_in) throw (DataTypeMismatchException) {
void DataElement::get(string &str_in) {
if (!data_type)
return;
@@ -274,7 +274,7 @@ void DataElement::get(string &str_in) throw (DataTypeMismatchException) {
}
}
void DataElement::get(vector<string> &strvect_in) throw (DataTypeMismatchException) {
void DataElement::get(vector<string> &strvect_in) {
size_t ptr;
if (!data_type)
return;
@@ -291,7 +291,7 @@ void DataElement::get(vector<string> &strvect_in) throw (DataTypeMismatchExcepti
}
void DataElement::get(std::set<string> &strset_in) throw (DataTypeMismatchException) {
void DataElement::get(std::set<string> &strset_in) {
if (!data_type)
return;
@@ -308,7 +308,7 @@ void DataElement::get(std::set<string> &strset_in) throw (DataTypeMismatchExcept
}
}
#define DataElementGetNumericVectorDef(enumtype, datatype, ...) void DataElement::get(vector<datatype>& val_out) throw (DataTypeMismatchException) { \
#define DataElementGetNumericVectorDef(enumtype, datatype, ...) void DataElement::get(vector<datatype>& val_out) { \
if (!data_type || !unit_size) return; \
if (data_type != enumtype) { \
int _compat[] = {__VA_ARGS__}; \
@@ -457,7 +457,7 @@ DataNode *DataNode::newChild(const char *name_in) {
return children.back();
}
DataNode *DataNode::child(const char *name_in, int index) throw (DataInvalidChildException) {
DataNode *DataNode::child(const char *name_in, int index) {
DataNode *child_ret;
child_ret = childmap[name_in][index];
@@ -471,7 +471,7 @@ DataNode *DataNode::child(const char *name_in, int index) throw (DataInvalidChil
return child_ret;
}
DataNode *DataNode::child(int index) throw (DataInvalidChildException) {
DataNode *DataNode::child(int index) {
DataNode *child_ret;
@@ -502,11 +502,11 @@ bool DataNode::hasAnother(const char *name_in) {
return childmap[name_in].size() != childmap_ptr[name_in];
}
DataNode *DataNode::getNext() throw (DataInvalidChildException) {
DataNode *DataNode::getNext() {
return child(ptr++);
}
DataNode *DataNode::getNext(const char *name_in) throw (DataInvalidChildException) {
DataNode *DataNode::getNext(const char *name_in) {
return child(name_in, childmap_ptr[name_in]++);
}
+38 -38
View File
@@ -167,45 +167,45 @@ public:
/* get overloads */
void get(char &char_in) throw (DataTypeMismatchException);
void get(unsigned char &uchar_in) throw (DataTypeMismatchException);
void get(int &int_in) throw (DataTypeMismatchException);
void get(unsigned int &uint_in) throw (DataTypeMismatchException);
void get(long &long_in) throw (DataTypeMismatchException);
void get(unsigned long &ulong_in) throw (DataTypeMismatchException);
void get(long long &long_in) throw (DataTypeMismatchException);
void get(float &float_in) throw (DataTypeMismatchException);
void get(double &double_in) throw (DataTypeMismatchException);
void get(long double &ldouble_in) throw (DataTypeMismatchException);
void get(char &char_in);
void get(unsigned char &uchar_in);
void get(int &int_in);
void get(unsigned int &uint_in);
void get(long &long_in);
void get(unsigned long &ulong_in);
void get(long long &long_in);
void get(float &float_in);
void get(double &double_in);
void get(long double &ldouble_in);
void get(char **data_in) throw (DataTypeMismatchException); /* getting a void or string */
void get(string &str_in) throw (DataTypeMismatchException);
void get(std::set<string> &strset_in) throw (DataTypeMismatchException);
void get(char **data_in); /* getting a void or string */
void get(string &str_in);
void get(std::set<string> &strset_in);
void get(vector<string> &strvect_in) throw (DataTypeMismatchException);
void get(vector<char> &charvect_in) throw (DataTypeMismatchException);
void get(vector<unsigned char> &ucharvect_in) throw (DataTypeMismatchException);
void get(vector<int> &intvect_in) throw (DataTypeMismatchException);
void get(vector<unsigned int> &uintvect_in) throw (DataTypeMismatchException);
void get(vector<long> &longvect_in) throw (DataTypeMismatchException);
void get(vector<unsigned long> &ulongvect_in) throw (DataTypeMismatchException);
void get(vector<long long> &llongvect_in) throw (DataTypeMismatchException);
void get(vector<float> &floatvect_in) throw (DataTypeMismatchException);
void get(vector<double> &doublevect_in) throw (DataTypeMismatchException);
void get(vector<long double> &ldoublevect_in) throw (DataTypeMismatchException);
void get(vector<string> &strvect_in);
void get(vector<char> &charvect_in);
void get(vector<unsigned char> &ucharvect_in);
void get(vector<int> &intvect_in);
void get(vector<unsigned int> &uintvect_in);
void get(vector<long> &longvect_in);
void get(vector<unsigned long> &ulongvect_in);
void get(vector<long long> &llongvect_in);
void get(vector<float> &floatvect_in);
void get(vector<double> &doublevect_in);
void get(vector<long double> &ldoublevect_in);
/* special get functions, saves creating unnecessary vars */
int getChar() throw (DataTypeMismatchException) { char i_get; get(i_get); return i_get; };
unsigned int getUChar() throw (DataTypeMismatchException) { unsigned char i_get; get(i_get); return i_get; };
int getInt() throw (DataTypeMismatchException) { int i_get; get(i_get); return i_get; };
unsigned int getUInt() throw (DataTypeMismatchException) { unsigned int i_get; get(i_get); return i_get; };
long getLong() throw (DataTypeMismatchException) { long l_get; get(l_get); return l_get; };
unsigned long getULong() throw (DataTypeMismatchException) { unsigned long l_get; get(l_get); return l_get; };
long getLongLong() throw (DataTypeMismatchException) { long long l_get; get(l_get); return l_get; };
float getFloat() throw (DataTypeMismatchException) { float f_get; get(f_get); return f_get; };
double getDouble() throw (DataTypeMismatchException) { double d_get; get(d_get); return d_get; };
long double getLongDouble() throw (DataTypeMismatchException) { long double d_get; get(d_get); return d_get; };
int getChar() { char i_get; get(i_get); return i_get; };
unsigned int getUChar() { unsigned char i_get; get(i_get); return i_get; };
int getInt() { int i_get; get(i_get); return i_get; };
unsigned int getUInt() { unsigned int i_get; get(i_get); return i_get; };
long getLong() { long l_get; get(l_get); return l_get; };
unsigned long getULong() { unsigned long l_get; get(l_get); return l_get; };
long getLongLong() { long long l_get; get(l_get); return l_get; };
float getFloat() { float f_get; get(f_get); return f_get; };
double getDouble() { double d_get; get(d_get); return d_get; };
long double getLongDouble() { long double d_get; get(d_get); return d_get; };
std::string toString();
@@ -248,14 +248,14 @@ public:
DataElement *element(); /* DataElement at this node */
DataNode *newChild(const char *name_in);
DataNode *child(const char *name_in, int index = 0) throw (DataInvalidChildException);
DataNode *child(int index) throw (DataInvalidChildException);
DataNode *child(const char *name_in, int index = 0);
DataNode *child(int index);
bool hasAnother(const char *name_in); /* useful for while() loops in conjunction with getNext() */
bool hasAnother();
DataNode *getNext(const char *name_in) throw (DataInvalidChildException); /* get next of specified name */
DataNode *getNext() throw (DataInvalidChildException); /* get next child */
DataNode *getNext(const char *name_in); /* get next of specified name */
DataNode *getNext(); /* get next child */
void rewind(const char *name_in); /* rewind specific */
void rewind(); /* rewind generic */
+1 -1
View File
@@ -41,7 +41,7 @@ void Timer::reset(void)
void Timer::lockFramerate(float f_rate)
{
lock_rate = 1.0/f_rate;
lock_rate = 1.0f/f_rate;
lock_state = true;
}