mirror of
https://github.com/boostorg/poly_collection.git
synced 2026-07-21 13:33:37 +00:00
removed/escaped spurious semicolons
This commit is contained in:
@@ -70,7 +70,7 @@ int main()
|
||||
s.render(std::cout);
|
||||
comma=",";
|
||||
}
|
||||
};
|
||||
}
|
||||
std::cout<<"\n";
|
||||
//]
|
||||
};
|
||||
|
||||
@@ -58,21 +58,21 @@ int main()
|
||||
//->
|
||||
//= auto render_sprite(const sprite& s){
|
||||
return [&](std::ostream& os){s.render(os);};
|
||||
};
|
||||
}/*<-*/;/*->*/
|
||||
|
||||
//<-
|
||||
auto render_message=[](const std::string& m){
|
||||
//->
|
||||
//= auto render_message(const std::string& m){
|
||||
return [&](std::ostream& os){os<<m;};
|
||||
};
|
||||
}/*<-*/;/*->*/
|
||||
|
||||
//<-
|
||||
auto render_window=[](const window& w){
|
||||
//->
|
||||
//= auto render_window(const window& w){
|
||||
return [&](std::ostream& os){w.display(os);};
|
||||
};
|
||||
}/*<-*/;/*->*/
|
||||
//= ...
|
||||
//=
|
||||
for(const auto& ps:sprs)c.insert(render_sprite(*ps));
|
||||
|
||||
@@ -36,7 +36,7 @@ struct warrior:sprite
|
||||
using sprite::sprite;
|
||||
warrior(std::string rank,int id):sprite{id},rank{std::move(rank)}{}
|
||||
|
||||
void render(std::ostream& os)const override{os<<rank<<" "<<id;};
|
||||
void render(std::ostream& os)const override{os<<rank<<" "<<id;}
|
||||
|
||||
std::string rank="warrior";
|
||||
};
|
||||
@@ -49,7 +49,7 @@ struct juggernaut:warrior
|
||||
struct goblin:sprite
|
||||
{
|
||||
using sprite::sprite;
|
||||
void render(std::ostream& os)const override{os<<"goblin "<<id;};
|
||||
void render(std::ostream& os)const override{os<<"goblin "<<id;}
|
||||
};
|
||||
//]
|
||||
|
||||
@@ -70,7 +70,7 @@ struct elf:sprite
|
||||
using sprite::sprite;
|
||||
elf(const elf&)=delete; // not copyable
|
||||
elf(elf&&)=default; // but moveable
|
||||
void render(std::ostream& os)const override{os<<"elf "<<id;};
|
||||
void render(std::ostream& os)const override{os<<"elf "<<id;}
|
||||
};
|
||||
//]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user