Several fixes to build on Linux

Originally committed to SVN as r887.
This commit is contained in:
Rodrigo Braz Monteiro 2007-01-24 02:11:26 +00:00
parent f058f5779f
commit 6d84bde8da
7 changed files with 8 additions and 9 deletions

View File

@ -797,7 +797,7 @@ wxString AssDialogue::GetStrippedText() {
wxString justtext = wxString(_T("")); wxString justtext = wxString(_T(""));
bool inCode = false; 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; if (Text[charindex] == '{') inCode = true;
else if (Text[charindex] == '}') inCode = false; else if (Text[charindex] == '}') inCode = false;
else if (!inCode) justtext = justtext + Text[charindex]; else if (!inCode) justtext = justtext + Text[charindex];

View File

@ -235,4 +235,4 @@ AudioProvider *AudioProviderFactory::GetAudioProvider(wxString filename, int cac
////////// //////////
// Static // Static
std::map<wxString,AudioProviderFactory*>* AegisubFactory<AudioProviderFactory>::factories=NULL; template <class AudioProviderFactory> std::map<wxString,AudioProviderFactory*>* AegisubFactory<AudioProviderFactory>::factories=NULL;

View File

@ -76,7 +76,7 @@ public:
class LAVCAudioProviderFactory : public AudioProviderFactory { class LAVCAudioProviderFactory : public AudioProviderFactory {
public: public:
AudioProvider *CreateProvider(wxString file) { return new LAVCAudioProvider(file); } AudioProvider *CreateProvider(wxString file) { return new LAVCAudioProvider(file); }
AvisynthAudioProviderFactory() : AudioProviderFactory(_T("lavc")) {} LAVCAudioProviderFactory() : AudioProviderFactory(_T("lavc")) {}
} registerLAVCaudio; } registerLAVCaudio;
@ -207,4 +207,3 @@ void LAVCAudioProvider::GetAudio(void *buf, __int64 start, __int64 count)
} }
} }
#endif

View File

@ -57,7 +57,7 @@ protected:
factories = new std::map<wxString,T*>; factories = new std::map<wxString,T*>;
return NULL; return NULL;
} }
std::map<wxString,T*>::iterator res = factories->find(name.Lower()); typename std::map<wxString,T*>::iterator res = factories->find(name.Lower());
if (res != factories->end()) return res->second; if (res != factories->end()) return res->second;
return NULL; return NULL;
} }
@ -67,7 +67,7 @@ public:
if (factories == NULL) factories = new std::map<wxString,T*>; if (factories == NULL) factories = new std::map<wxString,T*>;
wxArrayString list; wxArrayString list;
favourite = favourite.Lower(); favourite = favourite.Lower();
for (std::map<wxString,T*>::iterator cur=factories->begin();cur!=factories->end();cur++) { for (typename std::map<wxString,T*>::iterator cur=factories->begin();cur!=factories->end();cur++) {
if (cur->first == favourite) list.Insert(cur->first,0); if (cur->first == favourite) list.Insert(cur->first,0);
else list.Add(cur->first); else list.Add(cur->first);
} }

View File

@ -74,4 +74,4 @@ SubtitlesProvider* SubtitlesProviderFactory::GetProvider() {
////////// //////////
// Static // Static
std::map<wxString,SubtitlesProviderFactory*>* AegisubFactory<SubtitlesProviderFactory>::factories=NULL; template <class SubtitlesProviderFactory> std::map<wxString,SubtitlesProviderFactory*>* AegisubFactory<SubtitlesProviderFactory>::factories=NULL;

View File

@ -34,7 +34,7 @@
// //
#pragma once; #pragma once
/////////////////////// ///////////////////////

View File

@ -154,4 +154,4 @@ VideoProvider *VideoProviderFactory::GetProvider(wxString video,double fps) {
////////// //////////
// Static // Static
std::map<wxString,VideoProviderFactory*>* AegisubFactory<VideoProviderFactory>::factories=NULL; template <class VideoProviderFactory> std::map<wxString,VideoProviderFactory*>* AegisubFactory<VideoProviderFactory>::factories=NULL;