From f3260fdc3454cde02ac901955a1d0cd867aa8508 Mon Sep 17 00:00:00 2001 From: ousttrue Date: Wed, 7 Mar 2012 23:33:30 +0900 Subject: [PATCH] clean up for vs2010 --- src/binary.cpp | 8 ++++---- src/pmd.h | 7 ------- src/premake4.lua | 38 ++++++++++++++++++++------------------ 3 files changed, 24 insertions(+), 29 deletions(-) diff --git a/src/binary.cpp b/src/binary.cpp index 6c1a589..52a8a33 100644 --- a/src/binary.cpp +++ b/src/binary.cpp @@ -19,12 +19,12 @@ namespace meshio { return 0; } io_.read(buf, size); - size=io_.gcount(); - if(size==0){ + size_t read_size=static_cast(io_.gcount()); + if(read_size==0){ eof_=true; } - pos_+=size; - return size; + pos_+=read_size; + return read_size; } unsigned int FileReader::getPos()const diff --git a/src/pmd.h b/src/pmd.h index af9bb27..d0deb7b 100644 --- a/src/pmd.h +++ b/src/pmd.h @@ -37,14 +37,7 @@ #include "binary.h" #include #include -#ifdef _MSC_VER -#include -namespace std { - using boost::array; -} -#else #include -#endif namespace meshio { namespace pmd { diff --git a/src/premake4.lua b/src/premake4.lua index 437da6c..5d2691f 100644 --- a/src/premake4.lua +++ b/src/premake4.lua @@ -1,13 +1,31 @@ solution "meshio" configurations { "Debug", "Release" } +configuration { "vs*" } +do + buildoptions { + "/wd4996", + } +end + +configuration { "gmake" } +do + buildoptions { + "-std=c++0x", + } +end + +configuration "Debug gmake" +do + buildoptions { "-g", "-Wall" } + linkoptions { "-g" } +end + configuration "Debug" do targetdir "../debug" flags { "Symbols" } - buildoptions { "-g", "-Wall" } defines { "DEBUG" } - linkoptions { "-g" } end configuration "Release" @@ -17,7 +35,6 @@ do defines { "NDEBUG" } end - -- A project defines one build target project "meshio" --kind "WindowedApp" @@ -37,18 +54,3 @@ linkoptions {} libdirs {} links {} -configuration { "windows", "not gmake" } -do - -- VC - buildoptions { - "/wd4996", - } -end - -configuration { "gmake" } -do - buildoptions { - "-std=c++0x", - } -end - -- 2.11.0