From: Alec Thomas Date: Thu, 9 Oct 2014 10:24:30 +0000 (+1100) Subject: Don't use deprecated strstream. X-Git-Url: https://code.bitgloo.com/?a=commitdiff_plain;h=2c85b9c65fce2f45a746f7f170d635ed335bd642;p=clyne%2Fentityx.git Don't use deprecated strstream. --- diff --git a/examples/example.cc b/examples/example.cc index 0caa952..28fe023 100644 --- a/examples/example.cc +++ b/examples/example.cc @@ -16,8 +16,8 @@ * c++ -O3 -std=c++11 -Wall -lsfml-system -lsfml-window -lsfml-graphics -lentityx readme.cc -o readme */ #include +#include #include -#include #include #include #include @@ -248,11 +248,10 @@ public: } last_update += dt; if (last_update >= 1.0) { - std::strstream out; + std::ostringstream out; out << es.size() << " entities (" << static_cast(1.0 / dt) << " fps)"; text.setString(out.str()); last_update = 0.0; - out.freeze(false); } target.draw(text); } @@ -280,7 +279,7 @@ public: ex::Entity entity = entities.create(); // Mark as collideable (explosion particles will not be collideable). - Collideable::Handle collideable = entity.assign(r(8, 2)); + Collideable::Handle collideable = entity.assign(r(10, 5)); // "Physical" attributes. entity.assign(