mirror of
https://github.com/vcmi/vcmi.git
synced 2026-06-19 22:57:37 +02:00
* next part of exchange window
* changed some CDefHandlers to CDefEssential (the second is less memory consuming) * minor changes
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user