* next part of exchange window

* changed some CDefHandlers to CDefEssential (the second is less memory consuming)
* minor changes
This commit is contained in:
mateuszb
2009-06-17 16:46:16 +00:00
parent 7932a9e8ad
commit ae3fa69134
14 changed files with 105 additions and 132 deletions
+2 -2
View File
@@ -27,7 +27,7 @@ static unsigned int readNr(std::string &in, int &it)
if(last==in.size())
throw std::string("Cannot read number...");
std::stringstream ss(in.substr(it,last-it));
std::istringstream ss(in.substr(it,last-it));
it+=(1+last-it);
ss >> last;
return last;
@@ -127,7 +127,7 @@ void CBuildingHandler::loadBuildings()
while(it<seppos)
{
int last = linia.find_first_of(' ',it);
std::stringstream ss(linia.substr(it,last-it));
std::istringstream ss(linia.substr(it,last-it));
it = last + 1;
ss >> last;
(hall[tid].second)[j][box].push_back(last);
+2 -2
View File
@@ -14,7 +14,7 @@
*
*/
class CDefHandler;
class CDefEssential;
class CLodHandler;
class DLL_EXPORT CGDefInfo
{
@@ -30,7 +30,7 @@ public:
terrainMenu; //in which menus in map editor object will be showed
si32 width, height; //tiles
si32 type; //(0- ground, 1- towns, 2-creatures, 3- heroes, 4-artifacts, 5- resources)
CDefHandler * handler;
CDefEssential * handler;
si32 printPriority;
bool isVisitable();
bool operator<(const CGDefInfo& por)
+2 -2
View File
@@ -158,7 +158,7 @@ void CSoundHandler::initCreaturesSounds(std::vector<CCreature> &creatures)
{
std::string cname="", attack="", defend="", killed="", move="",
shoot="", wince="", ext1="", ext2="";
std::stringstream str(line);
std::istringstream str(line);
str >> cname >> attack >> defend >> killed >> move >> shoot >> wince >> ext1 >> ext2;
@@ -232,7 +232,7 @@ void CSoundHandler::initSpellsSounds(std::vector<CSpell> &spells)
{
int spellid;
std::string soundfile="";
std::stringstream str(line);
std::istringstream str(line);
str >> spellid >> soundfile;