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); } }