aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--demos/smoke/Game.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/demos/smoke/Game.cpp b/demos/smoke/Game.cpp
index 656d910f..5affc086 100644
--- a/demos/smoke/Game.cpp
+++ b/demos/smoke/Game.cpp
@@ -14,24 +14,20 @@
* limitations under the License.
*/
+#include <sstream>
+
#include "Game.h"
#include "Shell.h"
-#if (defined(_MSC_VER) && _MSC_VER < 1900 /*vs2015*/) || \
- defined MINGW_HAS_SECURE_API
-#include <basetsd.h>
-#define snprintf sprintf_s
-#endif
-
void Game::print_stats() {
// Output frame count and measured elapsed time
auto now = std::chrono::system_clock::now();
auto elapsed = now - start_time;
auto elapsed_millis =
std::chrono::duration_cast<std::chrono::milliseconds>(elapsed).count();
- char msg[256];
- snprintf(msg, 255, "frames:%d, elapsedms:%ld", frame_count, elapsed_millis);
- shell_->log(Shell::LogPriority::LOG_INFO, msg);
+ std::stringstream ss;
+ ss << "frames:" << frame_count << ", elapsedms:" << elapsed_millis;
+ shell_->log(Shell::LogPriority::LOG_INFO, ss.str().c_str());
}
void Game::quit() {