From 5ed8bf89f6b342a9f58c743bf66ab399a8d45d5f Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Tue, 6 Jul 2010 19:33:09 +0000 Subject: [PATCH] Fix gcc build errors Originally committed to SVN as r4658. --- aegisub/libaegisub/common/charset_conv.cpp | 4 +++- aegisub/src/visual_tool.h | 2 +- aegisub/src/visual_tool_vector_clip.cpp | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/aegisub/libaegisub/common/charset_conv.cpp b/aegisub/libaegisub/common/charset_conv.cpp index b8eeb7bb7..841b3d563 100644 --- a/aegisub/libaegisub/common/charset_conv.cpp +++ b/aegisub/libaegisub/common/charset_conv.cpp @@ -31,6 +31,8 @@ #include #include +using std::min; + // Check if we can use advanced fallback capabilities added in GNU's iconv // implementation #if !defined(_LIBICONV_VERSION) || _LIBICONV_VERSION < 0x010A || defined(LIBICONV_PLUG) @@ -161,7 +163,7 @@ public: // convert at least one extra character char bom[8]; char *dst = bom; - size_t dstSize = min(8, bomSize + *outbytesleft); + size_t dstSize = min(8U, bomSize + *outbytesleft); const char *src = *inbuf; size_t srcSize = *inbytesleft; iconv(cd, ICONV_CONST_CAST(&src), &srcSize, &dst, &dstSize); diff --git a/aegisub/src/visual_tool.h b/aegisub/src/visual_tool.h index 9b6480187..0b322fc4a 100644 --- a/aegisub/src/visual_tool.h +++ b/aegisub/src/visual_tool.h @@ -90,7 +90,7 @@ struct ltaddr { template class VisualTool : public IVisualTool, protected SubtitleSelectionListener { protected: - typedef typename FeatureType Feature; + typedef FeatureType Feature; typedef typename std::list::iterator feature_iterator; typedef typename std::list::const_iterator feature_const_iterator; private: diff --git a/aegisub/src/visual_tool_vector_clip.cpp b/aegisub/src/visual_tool_vector_clip.cpp index c6887a50c..848b68de5 100644 --- a/aegisub/src/visual_tool_vector_clip.cpp +++ b/aegisub/src/visual_tool_vector_clip.cpp @@ -72,8 +72,8 @@ enum { template static void for_each_iter(C &container, O obj, M method) { - C::iterator end = container.end(); - for (C::iterator cur = container.begin(); cur != end; ++cur) { + typename C::iterator end = container.end(); + for (typename C::iterator cur = container.begin(); cur != end; ++cur) { (obj ->* method)(cur); } }