Added missing virtual destructors.

Originally committed to SVN as r2043.
This commit is contained in:
Rodrigo Braz Monteiro 2008-03-13 18:06:13 +00:00
parent 3cade86767
commit 6e5f23c1cd
9 changed files with 21 additions and 15 deletions

View file

@ -53,6 +53,7 @@
DebugInformationFormat="4"
DisableSpecificWarnings="4996"
ForcedIncludeFiles="prec.h"
EnablePREfast="false"
/>
<Tool
Name="VCManagedResourceCompilerTool"

View file

@ -342,8 +342,8 @@ void FormatHandlerASS::WriteSection(TextFileWriter &writer,SectionPtr section)
// Write properties
size_t props = section->GetPropertyCount();
for (size_t i=0;i<props;i++) {
String name = section->GetPropertyName(i);
writer.WriteLineToFile(name + _T(": ") + section->GetProperty(name));
String propName = section->GetPropertyName(i);
writer.WriteLineToFile(propName + _T(": ") + section->GetProperty(name));
}
// Write contents

View file

@ -39,6 +39,7 @@
#include "section.h"
#include "section_entry_dialogue.h"
#include "section_entry_style.h"
#include "tr1.h"
namespace Aegilib {
@ -119,7 +120,7 @@ namespace Aegilib {
String effect;
String actor;
Time start,end;
int margin[4];
array<int,4> margin;
int layer;
bool isComment;
@ -143,7 +144,7 @@ namespace Aegilib {
Time GetEndTime() const { return end; }
bool IsComment() const { return isComment; }
int GetLayer() const { return layer; }
int GetMargin(int n) const { return margin[n]; }
int GetMargin(int n) const { return margin.at(n); }
const String& GetStyle() const { return style; }
const String& GetActor() const { return actor; }
const String& GetUserField() const { return effect; }
@ -154,7 +155,7 @@ namespace Aegilib {
void SetEndTime(Time setEnd) { end = setEnd; }
void SetComment(bool _isComment) { isComment = _isComment; }
void SetLayer(int _layer) { layer = _layer; }
void SetMargin(int _margin,int value) { margin[_margin] = value; }
void SetMargin(int _margin,int value) { margin.at(_margin) = value; }
void SetStyle(const String &_style) { style = _style; }
void SetUserField(const String &userField) { effect = userField; }
};
@ -166,8 +167,8 @@ namespace Aegilib {
String font;
float fontSize;
Colour colour[5]; // 0 = Primary, 1 = Secondary, 2 = Tertiary, 3 = Outline, 4 = Shadow
int margin[4];
array<Colour,5> colour; // 0 = Primary, 1 = Secondary, 2 = Tertiary, 3 = Outline, 4 = Shadow
array<int,4> margin;
bool bold;
bool italic;
@ -200,8 +201,8 @@ namespace Aegilib {
String GetName() const { return name; }
String GetFontName() const { return font; }
float GetFontSize() const { return fontSize; }
Colour GetColour(int n) const { return colour[n]; }
int GetMargin(int n) const { return margin[n]; }
Colour GetColour(int n) const { return colour.at(n); }
int GetMargin(int n) const { return margin.at(n); }
};
};

View file

@ -74,7 +74,7 @@ void TextFileReader::SetEncodingConfiguration() {
// Set encoding configuration
swap = false;
Is16 = false;
conv = shared_ptr<wxMBConv>();
//conv = shared_ptr<wxMBConv>();
if (encoding == _T("UTF-8")) {
conv = shared_ptr<wxMBConv> (new wxMBConvUTF8);
}

View file

@ -35,7 +35,7 @@
#include "version.h"
#include "tr1.h"
#include "aegistring.h"
using namespace Aegilib;
@ -57,17 +57,17 @@ String Aegilib::GetLibraryURL()
/////////////////////////
// Host application data
static shared_ptr<String> hostName;
static shared_ptr<String> hostURL;
static String* hostName = NULL;
static String* hostURL = NULL;
void Aegilib::SetHostApplicationName(const String name)
{
if (!hostName) hostName = shared_ptr<String> (new String());
if (!hostName) hostName = new String();
*hostName = name;
}
void Aegilib::SetHostApplicationURL(const String url)
{
if (!hostURL) hostName = shared_ptr<String> (new String());
if (!hostURL) hostURL = new String();
*hostURL = url;
}
String Aegilib::GetHostApplicationName()

View file

@ -97,5 +97,6 @@ public:
// Factory
class AudioPlayerFactory {
public:
virtual ~AudioPlayerFactory() {}
virtual AudioPlayer *CreatePlayer()=0;
};

View file

@ -83,5 +83,6 @@ public:
// Factory
class AudioProviderFactory {
public:
virtual ~AudioProviderFactory() {}
virtual AudioProvider *CreateProvider(Aegisub::String filename)=0;
};

View file

@ -64,5 +64,6 @@ public:
// Factory
class SpellCheckerFactory {
public:
virtual ~SpellCheckerFactory() {}
virtual SpellChecker *CreateSpellChecker()=0;
};

View file

@ -87,5 +87,6 @@ public:
// Factory
class VideoProviderFactory {
public:
virtual ~VideoProviderFactory() {}
virtual VideoProvider *CreateProvider(Aegisub::String video,double fps=0.0)=0;
};