From 38ad2d98f972a5484e55175b01d113c87143ba94 Mon Sep 17 00:00:00 2001 From: Nicolay Korslund Date: Wed, 18 Aug 2010 19:50:59 +0200 Subject: [PATCH] Fixed windows issues + one minor optimization on to_utf8 --- apps/esmtool/esmtool_cmd.c | 2 +- apps/openmw/mwmechanics/mechanicsmanager.hpp | 2 +- components/esm_store/reclists.hpp | 1 + components/to_utf8/to_utf8.cpp | 8 +++++--- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/apps/esmtool/esmtool_cmd.c b/apps/esmtool/esmtool_cmd.c index ac770f742..f7e4d2d32 100644 --- a/apps/esmtool/esmtool_cmd.c +++ b/apps/esmtool/esmtool_cmd.c @@ -926,10 +926,10 @@ int update_arg(void *field, char **orig_field, const char *long_opt, char short_opt, const char *additional_error) { - FIX_UNUSED (field); char *stop_char = 0; const char *val = value; int found; + FIX_UNUSED (field); stop_char = 0; found = 0; diff --git a/apps/openmw/mwmechanics/mechanicsmanager.hpp b/apps/openmw/mwmechanics/mechanicsmanager.hpp index ca4c1c47b..5c96ce21f 100644 --- a/apps/openmw/mwmechanics/mechanicsmanager.hpp +++ b/apps/openmw/mwmechanics/mechanicsmanager.hpp @@ -9,7 +9,7 @@ namespace ESMS { - class ESMStore; + struct ESMStore; } namespace MWGui diff --git a/components/esm_store/reclists.hpp b/components/esm_store/reclists.hpp index 3b160259c..3cdb7f7b2 100644 --- a/components/esm_store/reclists.hpp +++ b/components/esm_store/reclists.hpp @@ -8,6 +8,7 @@ #include #include #include +#include namespace ESMS { diff --git a/components/to_utf8/to_utf8.cpp b/components/to_utf8/to_utf8.cpp index 701b7fe56..14a7ff1cc 100644 --- a/components/to_utf8/to_utf8.cpp +++ b/components/to_utf8/to_utf8.cpp @@ -39,9 +39,11 @@ // Generated tables #include "tables_gen.hpp" -// Shared global buffers, we love you. -static std::vector buf; -static std::vector output; +// Shared global buffers, we love you. These initial sizes are large +// enough to hold the largest books in Morrowind.esm, but we will +// resize automaticall if necessary. +static std::vector buf (50*1024); +static std::vector output (50*1024); static int size; // Make sure the given vector is large enough for 'size' bytes,