mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
Implemented reflection for PackageVersionData
A little memory cleanup (most memory loss is in wx and gtk though) git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@563 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -26,7 +26,7 @@ AlphaMask::AlphaMask(const Image& img)
|
|||||||
}
|
}
|
||||||
|
|
||||||
AlphaMask::~AlphaMask() {
|
AlphaMask::~AlphaMask() {
|
||||||
delete alpha;
|
delete[] alpha;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AlphaMask::setAlpha(Image& img) const {
|
void AlphaMask::setAlpha(Image& img) const {
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
#include <util/io/package_manager.hpp>
|
#include <util/io/package_manager.hpp>
|
||||||
#include <util/version.hpp>
|
#include <util/version.hpp>
|
||||||
#include <script/value.hpp> // for some strange reason the profile build needs this :(
|
#include <script/value.hpp> // for some strange reason the profile build needs this :(
|
||||||
|
#include <script/to_value.hpp>
|
||||||
#include <wx/dialup.h>
|
#include <wx/dialup.h>
|
||||||
#include <wx/url.h>
|
#include <wx/url.h>
|
||||||
#include <wx/html/htmlwin.h>
|
#include <wx/html/htmlwin.h>
|
||||||
@@ -30,7 +31,10 @@ class PackageVersionData : public IntrusivePtrBase<PackageVersionData> {
|
|||||||
String url; ///< Where can the package be downloaded?
|
String url; ///< Where can the package be downloaded?
|
||||||
bool is_installer; ///< Download url refers to a .mse-installer
|
bool is_installer; ///< Download url refers to a .mse-installer
|
||||||
Version version; ///< Version number of the download
|
Version version; ///< Version number of the download
|
||||||
|
Version app_version; ///< The minimium version of MSE required
|
||||||
vector<PackageDependencyP> depends; ///< Packages this depends on
|
vector<PackageDependencyP> depends; ///< Packages this depends on
|
||||||
|
|
||||||
|
DECLARE_REFLECTION();
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Information on the latest availible version
|
/// Information on the latest availible version
|
||||||
@@ -44,10 +48,21 @@ class VersionData : public IntrusivePtrBase<VersionData> {
|
|||||||
DECLARE_REFLECTION();
|
DECLARE_REFLECTION();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
IMPLEMENT_REFLECTION(PackageVersionData) {
|
||||||
|
REFLECT(name);
|
||||||
|
REFLECT(description);
|
||||||
|
REFLECT(url);
|
||||||
|
REFLECT(is_installer);
|
||||||
|
REFLECT(version);
|
||||||
|
REFLECT(app_version);
|
||||||
|
REFLECT(depends);
|
||||||
|
}
|
||||||
|
|
||||||
IMPLEMENT_REFLECTION(VersionData) {
|
IMPLEMENT_REFLECTION(VersionData) {
|
||||||
REFLECT(version);
|
REFLECT(version);
|
||||||
REFLECT(description);
|
REFLECT(description);
|
||||||
REFLECT(new_updates_url);
|
REFLECT(new_updates_url);
|
||||||
|
REFLECT(packages);
|
||||||
}
|
}
|
||||||
|
|
||||||
// The information for the latest version
|
// The information for the latest version
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ size_t TextViewer::Line::posToIndex(double x) const {
|
|||||||
// ----------------------------------------------------------------------------- : TextViewer
|
// ----------------------------------------------------------------------------- : TextViewer
|
||||||
|
|
||||||
// can't be declared in header because we need to know sizeof(Line)
|
// can't be declared in header because we need to know sizeof(Line)
|
||||||
TextViewer:: TextViewer() {}
|
TextViewer:: TextViewer() : justifying (false) {}
|
||||||
TextViewer::~TextViewer() {}
|
TextViewer::~TextViewer() {}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------- : Drawing
|
// ----------------------------------------------------------------------------- : Drawing
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ Reader::Reader(const InputStreamP& input, const String& filename, bool ignore_in
|
|||||||
Reader::Reader(const String& filename)
|
Reader::Reader(const String& filename)
|
||||||
: indent(0), expected_indent(0), state(OUTSIDE)
|
: indent(0), expected_indent(0), state(OUTSIDE)
|
||||||
, filename(filename), line_number(0), previous_line_number(0)
|
, filename(filename), line_number(0), previous_line_number(0)
|
||||||
|
, ignore_invalid(false)
|
||||||
, input(packages.openFileFromPackage(filename))
|
, input(packages.openFileFromPackage(filename))
|
||||||
{
|
{
|
||||||
moveNext();
|
moveNext();
|
||||||
|
|||||||
Reference in New Issue
Block a user