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(""));
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];

View file

@ -235,4 +235,4 @@ AudioProvider *AudioProviderFactory::GetAudioProvider(wxString filename, int cac
//////////
// 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 {
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

View file

@ -57,7 +57,7 @@ protected:
factories = new std::map<wxString,T*>;
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;
return NULL;
}
@ -67,7 +67,7 @@ public:
if (factories == NULL) factories = new std::map<wxString,T*>;
wxArrayString list;
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);
else list.Add(cur->first);
}

View file

@ -74,4 +74,4 @@ SubtitlesProvider* SubtitlesProviderFactory::GetProvider() {
//////////
// 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
std::map<wxString,VideoProviderFactory*>* AegisubFactory<VideoProviderFactory>::factories=NULL;
template <class VideoProviderFactory> std::map<wxString,VideoProviderFactory*>* AegisubFactory<VideoProviderFactory>::factories=NULL;