default smart pointer type switched to intrusive_ptr

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@337 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2007-05-11 21:34:53 +00:00
parent 3b6743b110
commit 33fd2b5e18
103 changed files with 368 additions and 256 deletions
+2 -2
View File
@@ -11,8 +11,8 @@
// ----------------------------------------------------------------------------- : BooleanField
BooleanField::BooleanField() {
choices->choices.push_back(new_shared1<Choice>(_("yes")));
choices->choices.push_back(new_shared1<Choice>(_("no")));
choices->choices.push_back(new_intrusive1<Choice>(_("yes")));
choices->choices.push_back(new_intrusive1<Choice>(_("no")));
choices->initIds();
}
+2 -2
View File
@@ -30,7 +30,7 @@ class ChoiceField : public Field {
DECLARE_FIELD_TYPE(Choice);
class Choice;
typedef shared_ptr<Choice> ChoiceP;
typedef intrusive_ptr<Choice> ChoiceP;
ChoiceP choices; ///< A choice group of possible choices
OptionalScript script; ///< Script to apply to all values
@@ -47,7 +47,7 @@ class ChoiceField : public Field {
};
/// An item that can be chosen for this field
class ChoiceField::Choice {
class ChoiceField::Choice : public IntrusivePtrBase<ChoiceField::Choice> {
public:
Choice();
Choice(const String& name);
+2 -2
View File
@@ -27,7 +27,7 @@ class ColorField : public Field {
DECLARE_FIELD_TYPE(Color);
class Choice;
typedef shared_ptr<Choice> ChoiceP;
typedef intrusive_ptr<Choice> ChoiceP;
OptionalScript script; ///< Script to apply to all values
OptionalScript default_script; ///< Script that generates the default value
@@ -42,7 +42,7 @@ class ColorField : public Field {
};
/// A color that can be chosen for this field
class ColorField::Choice {
class ColorField::Choice : public IntrusivePtrBase<ColorField::Choice> {
public:
String name; ///< Name of the color
Color color; ///< The actual color
+2 -1
View File
@@ -32,8 +32,9 @@ IMPLEMENT_REFLECTION(SymbolStyle) {
SymbolVariation::SymbolVariation()
: border_radius(0.05)
{}
SymbolVariation::~SymbolVariation() {}
IMPLEMENT_REFLECTION(SymbolVariation) {
IMPLEMENT_REFLECTION_NO_SCRIPT(SymbolVariation) {
REFLECT(name);
REFLECT(border_radius);
REFLECT_NAMELESS(filter);
+2 -1
View File
@@ -47,9 +47,10 @@ class SymbolStyle : public Style {
};
/// Styling for a symbol variation, defines color, border, etc.
class SymbolVariation {
class SymbolVariation : public IntrusivePtrBase<SymbolVariation> {
public:
SymbolVariation();
~SymbolVariation();
String name; ///< Name of this variation
SymbolFilterP filter; ///< Filter to color the symbol
double border_radius; ///< Border radius for the symbol
+1 -1
View File
@@ -48,7 +48,7 @@ class TextField : public Field {
// ----------------------------------------------------------------------------- : TextStyle
/// Background behind text
class TextBackground {
class TextBackground : public IntrusivePtrBase<TextBackground> {
public:
ScriptableImage image; ///< background image, stretched to text size
RealSize displacement;