From 61305ed0e4374ef6602fb164a2a8d79d408e0320 Mon Sep 17 00:00:00 2001 From: Jeremie Roy Date: Wed, 15 May 2013 15:12:25 +0200 Subject: [PATCH] fix warning and remove useless includes --- examples/10-font/font.cpp | 5 +++-- examples/11-fontsdf/fontsdf.cpp | 3 --- examples/common/font/font_manager.cpp | 1 - examples/common/font/text_buffer_manager.cpp | 3 --- 4 files changed, 3 insertions(+), 9 deletions(-) diff --git a/examples/10-font/font.cpp b/examples/10-font/font.cpp index 938cb144..0309defb 100644 --- a/examples/10-font/font.cpp +++ b/examples/10-font/font.cpp @@ -6,6 +6,7 @@ #include #include #include +#include #include "../common/entry.h" #include "../common/dbg.h" #include "../common/math.h" @@ -15,7 +16,6 @@ #include "../common/font/text_buffer_manager.h" #include -#include int _main_(int /*_argc*/, char** /*_argv*/) { @@ -154,7 +154,8 @@ int _main_(int /*_argc*/, char** /*_argv*/) //Use transient text to display debug information //Code below is similar to commented code above wchar_t fpsText[64]; - swprintf(fpsText,L"Frame: % 7.3f[ms]", double(frameTime)*toMs); + //swprintf(fpsText,L"Frame: % 7.3f[ms]", double(frameTime)*toMs); + swprintf(fpsText, countof(fpsText), L"Frame: % 7.3f[ms]", double(frameTime)*toMs); textBufferManager->clearTextBuffer(transientText); textBufferManager->setPenPosition(transientText, 20.0, 4.0f); diff --git a/examples/11-fontsdf/fontsdf.cpp b/examples/11-fontsdf/fontsdf.cpp index 0a56fc59..c1f9d860 100644 --- a/examples/11-fontsdf/fontsdf.cpp +++ b/examples/11-fontsdf/fontsdf.cpp @@ -14,9 +14,6 @@ #include "../common/font/font_manager.h" #include "../common/font/text_buffer_manager.h" -#include -#include - inline void mtxTranslate(float* _result, float x, float y, float z) { memset(_result, 0, sizeof(float)*16); diff --git a/examples/common/font/font_manager.cpp b/examples/common/font/font_manager.cpp index 17201a6d..782bd89c 100644 --- a/examples/common/font/font_manager.cpp +++ b/examples/common/font/font_manager.cpp @@ -21,7 +21,6 @@ #include #include -#include #include diff --git a/examples/common/font/text_buffer_manager.cpp b/examples/common/font/text_buffer_manager.cpp index 3ed7c4a2..c5047c3f 100644 --- a/examples/common/font/text_buffer_manager.cpp +++ b/examples/common/font/text_buffer_manager.cpp @@ -7,9 +7,6 @@ #include "../cube_atlas.h" #include -#include -#include -#include #include /* offsetof */ #include "vs_font_basic.bin.h"