From 6d84bde8daceb8cae992efaabef81b594f7f61e4 Mon Sep 17 00:00:00 2001 From: Rodrigo Braz Monteiro Date: Wed, 24 Jan 2007 02:11:26 +0000 Subject: [PATCH] Several fixes to build on Linux Originally committed to SVN as r887. --- aegisub/ass_dialogue.cpp | 2 +- aegisub/audio_provider.cpp | 2 +- aegisub/audio_provider_lavc.cpp | 3 +-- aegisub/factory.h | 4 ++-- aegisub/subtitles_provider.cpp | 2 +- aegisub/utils.h | 2 +- aegisub/video_provider.cpp | 2 +- 7 files changed, 8 insertions(+), 9 deletions(-) diff --git a/aegisub/ass_dialogue.cpp b/aegisub/ass_dialogue.cpp index 5308f9bd3..af883a7e1 100644 --- a/aegisub/ass_dialogue.cpp +++ b/aegisub/ass_dialogue.cpp @@ -797,7 +797,7 @@ wxString AssDialogue::GetStrippedText() { wxString justtext = wxString(_T("")); bool inCode = false; - for (int charindex = 0; charindex != Text.Len(); charindex++) { + for (size_t charindex = 0; charindex != Text.Len(); charindex++) { if (Text[charindex] == '{') inCode = true; else if (Text[charindex] == '}') inCode = false; else if (!inCode) justtext = justtext + Text[charindex]; diff --git a/aegisub/audio_provider.cpp b/aegisub/audio_provider.cpp index 39f07a96e..8f6701ea6 100644 --- a/aegisub/audio_provider.cpp +++ b/aegisub/audio_provider.cpp @@ -235,4 +235,4 @@ AudioProvider *AudioProviderFactory::GetAudioProvider(wxString filename, int cac ////////// // Static -std::map* AegisubFactory::factories=NULL; +template std::map* AegisubFactory::factories=NULL; diff --git a/aegisub/audio_provider_lavc.cpp b/aegisub/audio_provider_lavc.cpp index 54aa02d72..e080d5255 100644 --- a/aegisub/audio_provider_lavc.cpp +++ b/aegisub/audio_provider_lavc.cpp @@ -76,7 +76,7 @@ public: class LAVCAudioProviderFactory : public AudioProviderFactory { public: AudioProvider *CreateProvider(wxString file) { return new LAVCAudioProvider(file); } - AvisynthAudioProviderFactory() : AudioProviderFactory(_T("lavc")) {} + LAVCAudioProviderFactory() : AudioProviderFactory(_T("lavc")) {} } registerLAVCaudio; @@ -207,4 +207,3 @@ void LAVCAudioProvider::GetAudio(void *buf, __int64 start, __int64 count) } } -#endif diff --git a/aegisub/factory.h b/aegisub/factory.h index 37c4d773f..8654f5243 100644 --- a/aegisub/factory.h +++ b/aegisub/factory.h @@ -57,7 +57,7 @@ protected: factories = new std::map; return NULL; } - std::map::iterator res = factories->find(name.Lower()); + typename std::map::iterator res = factories->find(name.Lower()); if (res != factories->end()) return res->second; return NULL; } @@ -67,7 +67,7 @@ public: if (factories == NULL) factories = new std::map; wxArrayString list; favourite = favourite.Lower(); - for (std::map::iterator cur=factories->begin();cur!=factories->end();cur++) { + for (typename std::map::iterator cur=factories->begin();cur!=factories->end();cur++) { if (cur->first == favourite) list.Insert(cur->first,0); else list.Add(cur->first); } diff --git a/aegisub/subtitles_provider.cpp b/aegisub/subtitles_provider.cpp index 4c8185285..0cf73171b 100644 --- a/aegisub/subtitles_provider.cpp +++ b/aegisub/subtitles_provider.cpp @@ -74,4 +74,4 @@ SubtitlesProvider* SubtitlesProviderFactory::GetProvider() { ////////// // Static -std::map* AegisubFactory::factories=NULL; +template std::map* AegisubFactory::factories=NULL; diff --git a/aegisub/utils.h b/aegisub/utils.h index afd76a019..2150c45d0 100644 --- a/aegisub/utils.h +++ b/aegisub/utils.h @@ -34,7 +34,7 @@ // -#pragma once; +#pragma once /////////////////////// diff --git a/aegisub/video_provider.cpp b/aegisub/video_provider.cpp index 8d761a644..c834d7c94 100644 --- a/aegisub/video_provider.cpp +++ b/aegisub/video_provider.cpp @@ -154,4 +154,4 @@ VideoProvider *VideoProviderFactory::GetProvider(wxString video,double fps) { ////////// // Static -std::map* AegisubFactory::factories=NULL; +template std::map* AegisubFactory::factories=NULL;