Fix walls in strings and move constructor
This commit is contained in:
parent
7811daa78b
commit
30af43ae95
2 changed files with 2 additions and 1 deletions
|
@ -92,7 +92,7 @@ CTTRTSGame GetGameFromString( const std::string& input )
|
||||||
size_t pos;
|
size_t pos;
|
||||||
while ( ( pos = walls_str.find(']') ) != std::string::npos )
|
while ( ( pos = walls_str.find(']') ) != std::string::npos )
|
||||||
{
|
{
|
||||||
std::string pos_string = walls_str.substr(0,pos);
|
std::string pos_string = walls_str.substr(0,pos+1);
|
||||||
|
|
||||||
// Use scanf to extract positions
|
// Use scanf to extract positions
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,7 @@ CTTRTSGame::CTTRTSGame(CTTRTSGame&& game)
|
||||||
, dimensions(std::move(game.dimensions))
|
, dimensions(std::move(game.dimensions))
|
||||||
, turn(std::move(game.turn))
|
, turn(std::move(game.turn))
|
||||||
, name(std::move(game.name))
|
, name(std::move(game.name))
|
||||||
|
, m_walls(std::move(game.m_walls))
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue