]> git.stg.codes - stg.git/blobdiff - include/stg/corp_conf.h
Various fixes of issues reported by static analyzers.
[stg.git] / include / stg / corp_conf.h
index 88a84f1841c51d46f5bfb7520a816cb2032c1bd4..3810516dfb8e73d3c786dfce5fba9ebdea4e4b24 100644 (file)
@@ -1,10 +1,22 @@
 #ifndef CORP_CONF_H
 #define CORP_CONF_H
 
+#include <string>
+
 struct CORP_CONF
 {
-string  name;
-double  cash;
+CORP_CONF() : name(), cash(0) {}
+explicit CORP_CONF(const std::string & n) : name(n), cash(0) {}
+CORP_CONF(const std::string & n, double c) : name(n), cash(c) {}
+
+std::string name;
+double      cash;
 };
 
+inline
+bool operator==(const CORP_CONF & a, const CORP_CONF & b)
+{
+return a.name == b.name;
+}
+
 #endif //CORP_CONF_H