Fix gcc build errors

Originally committed to SVN as r4658.
This commit is contained in:
Thomas Goyne 2010-07-06 19:33:09 +00:00
parent d7ad7e861f
commit 5ed8bf89f6
3 changed files with 6 additions and 4 deletions

View file

@ -31,6 +31,8 @@
#include <libaegisub/charset_conv.h>
#include <iconv.h>
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);

View file

@ -90,7 +90,7 @@ struct ltaddr {
template<class FeatureType>
class VisualTool : public IVisualTool, protected SubtitleSelectionListener {
protected:
typedef typename FeatureType Feature;
typedef FeatureType Feature;
typedef typename std::list<FeatureType>::iterator feature_iterator;
typedef typename std::list<FeatureType>::const_iterator feature_const_iterator;
private:

View file

@ -72,8 +72,8 @@ enum {
template<class C, class O, class M>
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);
}
}