Commit ba518d58 authored by twanvl's avatar twanvl

Fixed some more compiler warnings

parent d2fde22f
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -77,8 +77,8 @@ void SymbolPartMatrixAction::transform(const Vector2D& mx, const Vector2D& my) { ...@@ -77,8 +77,8 @@ void SymbolPartMatrixAction::transform(const Vector2D& mx, const Vector2D& my) {
SymbolPartRotateAction::SymbolPartRotateAction(const set<SymbolPartP>& parts, const Vector2D& center) SymbolPartRotateAction::SymbolPartRotateAction(const set<SymbolPartP>& parts, const Vector2D& center)
: SymbolPartMatrixAction(parts, center) : SymbolPartMatrixAction(parts, center)
, constrain(false)
, angle(0) , angle(0)
, constrain(false)
{} {}
String SymbolPartRotateAction::getName(bool to_undo) const { String SymbolPartRotateAction::getName(bool to_undo) const {
...@@ -154,8 +154,8 @@ void SymbolPartShearAction::shearBy(const Vector2D& shear) { ...@@ -154,8 +154,8 @@ void SymbolPartShearAction::shearBy(const Vector2D& shear) {
SymbolPartScaleAction::SymbolPartScaleAction(const set<SymbolPartP>& parts, int scaleX, int scaleY) SymbolPartScaleAction::SymbolPartScaleAction(const set<SymbolPartP>& parts, int scaleX, int scaleY)
: parts(parts) : parts(parts)
, constrain(false)
, scaleX(scaleX), scaleY(scaleY) , scaleX(scaleX), scaleY(scaleY)
, constrain(false)
{ {
// Find min and max coordinates // Find min and max coordinates
oldMin = Vector2D::infinity(); oldMin = Vector2D::infinity();
......
...@@ -76,9 +76,9 @@ void ControlPointMoveAction::move (const Vector2D& deltaDelta) { ...@@ -76,9 +76,9 @@ void ControlPointMoveAction::move (const Vector2D& deltaDelta) {
HandleMoveAction::HandleMoveAction(const SelectedHandle& handle) HandleMoveAction::HandleMoveAction(const SelectedHandle& handle)
: handle(handle) : handle(handle)
, constrain(false)
, old_handle(handle.getHandle()) , old_handle(handle.getHandle())
, old_other (handle.getOther()) , old_other (handle.getOther())
, constrain(false)
{} {}
String HandleMoveAction::getName(bool to_undo) const { String HandleMoveAction::getName(bool to_undo) const {
...@@ -196,11 +196,11 @@ void CurveDragAction::move(const Vector2D& delta, double t) { ...@@ -196,11 +196,11 @@ void CurveDragAction::move(const Vector2D& delta, double t) {
// ----------------------------------------------------------------------------- : Add control point // ----------------------------------------------------------------------------- : Add control point
ControlPointAddAction::ControlPointAddAction(const SymbolPartP& part, UInt insert_after, double t) ControlPointAddAction::ControlPointAddAction(const SymbolPartP& part, UInt insert_after, double t)
: point1(part->getPoint(insert_after)) : part(part)
, point2(part->getPoint(insert_after + 1))
, part(part)
, insert_after(insert_after)
, new_point(new ControlPoint()) , new_point(new ControlPoint())
, insert_after(insert_after)
, point1(part->getPoint(insert_after))
, point2(part->getPoint(insert_after + 1))
{ {
// calculate new point // calculate new point
if (point1.other.segment_after == SEGMENT_CURVE) { if (point1.other.segment_after == SEGMENT_CURVE) {
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
// ----------------------------------------------------------------------------- : ValueAction // ----------------------------------------------------------------------------- : ValueAction
String ValueAction::getName(bool to_undo) const { String ValueAction::getName(bool to_undo) const {
return String::Format(_ACTION_("change"), valueP->fieldP->name); return format_string(_ACTION_("change"), valueP->fieldP->name);
} }
// ----------------------------------------------------------------------------- : Simple // ----------------------------------------------------------------------------- : Simple
...@@ -61,8 +61,10 @@ ValueAction* value_action(const SymbolValueP& value, const FileName& ...@@ -61,8 +61,10 @@ ValueAction* value_action(const SymbolValueP& value, const FileName&
// ----------------------------------------------------------------------------- : Text // ----------------------------------------------------------------------------- : Text
TextValueAction::TextValueAction(const TextValueP& value, size_t start, size_t end, size_t new_end, const Defaultable<String>& new_value, const String& name) TextValueAction::TextValueAction(const TextValueP& value, size_t start, size_t end, size_t new_end, const Defaultable<String>& new_value, const String& name)
: ValueAction(value), new_value(new_value), name(name) : ValueAction(value)
, selection_start(start), selection_end(end), new_selection_end(new_end) , selection_start(start), selection_end(end), new_selection_end(new_end)
, new_value(new_value)
, name(name)
{} {}
String TextValueAction::getName(bool to_undo) const { return name; } String TextValueAction::getName(bool to_undo) const { return name; }
......
...@@ -26,8 +26,8 @@ Field::Field() ...@@ -26,8 +26,8 @@ Field::Field()
, identifying (false) , identifying (false)
, card_list_column (100) , card_list_column (100)
, card_list_width (100) , card_list_width (100)
, card_list_allow (true)
, card_list_visible(false) , card_list_visible(false)
, card_list_allow (true)
, card_list_align (ALIGN_LEFT) , card_list_align (ALIGN_LEFT)
, tab_index (0) , tab_index (0)
{} {}
...@@ -79,8 +79,8 @@ shared_ptr<Field> read_new<Field>(Reader& reader) { ...@@ -79,8 +79,8 @@ shared_ptr<Field> read_new<Field>(Reader& reader) {
Style::Style(const FieldP& field) Style::Style(const FieldP& field)
: fieldP(field) : fieldP(field)
, z_index(0) , z_index(0)
, left(0), width (0) , left(0), top(0)
, top (0), height(0) , width(0), height(0)
, visible(true) , visible(true)
{} {}
......
...@@ -14,8 +14,8 @@ DECLARE_TYPEOF_COLLECTION(ColorField::ChoiceP); ...@@ -14,8 +14,8 @@ DECLARE_TYPEOF_COLLECTION(ColorField::ChoiceP);
// ----------------------------------------------------------------------------- : ColorField // ----------------------------------------------------------------------------- : ColorField
ColorField::ColorField() ColorField::ColorField()
: default_name(_("Default")) : allow_custom(true)
, allow_custom(true) , default_name(_("Default"))
{} {}
IMPLEMENT_FIELD_TYPE(Color) IMPLEMENT_FIELD_TYPE(Color)
......
...@@ -52,8 +52,8 @@ StatsCategory::StatsCategory(const StatsDimensionP& dim) ...@@ -52,8 +52,8 @@ StatsCategory::StatsCategory(const StatsDimensionP& dim)
, name (dim->name) , name (dim->name)
, description (dim->description) , description (dim->description)
, icon_filename(dim->icon_filename) , icon_filename(dim->icon_filename)
, type(GRAPH_TYPE_BAR)
, dimensions(1, dim) , dimensions(1, dim)
, type(GRAPH_TYPE_BAR)
{} {}
IMPLEMENT_REFLECTION_ENUM(GraphType) { IMPLEMENT_REFLECTION_ENUM(GraphType) {
......
...@@ -114,7 +114,7 @@ wxIcon load_resource_icon(const String& name) { ...@@ -114,7 +114,7 @@ wxIcon load_resource_icon(const String& name) {
#if defined(__WXMSW__) #if defined(__WXMSW__)
return wxIcon(_("icon/") + name); return wxIcon(_("icon/") + name);
#else #else
return wxIcon(load_resource_image(_("icon/") + name)); return wxIcon(_("icon/") + name + _(".ico"), wxBITMAP_TYPE_ICO);
#endif #endif
} }
......
...@@ -41,7 +41,12 @@ IMPLEMENT_APP(MSE) ...@@ -41,7 +41,12 @@ IMPLEMENT_APP(MSE)
bool MSE::OnInit() { bool MSE::OnInit() {
try { try {
#ifdef __WXMSW__
SetAppName(_("Magic Set Editor")); SetAppName(_("Magic Set Editor"));
#else
// Platform friendly appname
SetAppName(_("magicseteditor"));
#endif
wxInitAllImageHandlers(); wxInitAllImageHandlers();
wxFileSystem::AddHandler(new wxInternetFSHandler); // needed for update checker wxFileSystem::AddHandler(new wxInternetFSHandler); // needed for update checker
init_file_formats(); init_file_formats();
......
...@@ -28,7 +28,7 @@ DECLARE_POINTER_TYPE(Card); ...@@ -28,7 +28,7 @@ DECLARE_POINTER_TYPE(Card);
class SetScriptContext { class SetScriptContext {
public: public:
SetScriptContext(Set& set); SetScriptContext(Set& set);
~SetScriptContext(); virtual ~SetScriptContext();
/// Get a context to use for the set, for a given stylesheet /// Get a context to use for the set, for a given stylesheet
Context& getContext(const StyleSheetP&); Context& getContext(const StyleSheetP&);
......
...@@ -22,8 +22,8 @@ IMPLEMENT_DYNAMIC_ARG(Package*, writing_package, nullptr); ...@@ -22,8 +22,8 @@ IMPLEMENT_DYNAMIC_ARG(Package*, writing_package, nullptr);
IMPLEMENT_DYNAMIC_ARG(Package*, clipboard_package, nullptr); IMPLEMENT_DYNAMIC_ARG(Package*, clipboard_package, nullptr);
Package::Package() Package::Package()
: zipStream (nullptr) : fileStream(nullptr)
, fileStream(nullptr) , zipStream (nullptr)
{} {}
Package::~Package() { Package::~Package() {
......
...@@ -14,19 +14,18 @@ ...@@ -14,19 +14,18 @@
// ----------------------------------------------------------------------------- : Reader // ----------------------------------------------------------------------------- : Reader
Reader::Reader(const InputStreamP& input, const String& filename) Reader::Reader(const InputStreamP& input, const String& filename)
: input(input), filename(filename), line_number(0) : indent(0), expected_indent(0), just_opened(false)
, indent(0), expected_indent(0), just_opened(false) , filename(filename), line_number(0)
, stream(*input) , input(input), stream(*input)
{ {
moveNext(); moveNext();
handleAppVersion(); handleAppVersion();
} }
Reader::Reader(const String& filename) Reader::Reader(const String& filename)
: input(packages.openFileFromPackage(filename)) : indent(0), expected_indent(0), just_opened(false)
, filename(filename), line_number(0) , filename(filename), line_number(0)
, indent(0), expected_indent(0), just_opened(false) , input(packages.openFileFromPackage(filename)), stream(*input)
, stream(*input)
{ {
moveNext(); moveNext();
handleAppVersion(); handleAppVersion();
......
...@@ -15,10 +15,8 @@ ...@@ -15,10 +15,8 @@
// ----------------------------------------------------------------------------- : Writer // ----------------------------------------------------------------------------- : Writer
Writer::Writer(const OutputStreamP& output) Writer::Writer(const OutputStreamP& output)
: output(output) : indentation(0), just_opened(false)
, stream(*output) , output(output), stream(*output)
, indentation(0)
, just_opened(false)
{ {
stream.WriteString(BYTE_ORDER_MARK); stream.WriteString(BYTE_ORDER_MARK);
handleAppVersion(); handleAppVersion();
......
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
//| License: GNU General Public License 2 or later (see file COPYING) | //| License: GNU General Public License 2 or later (see file COPYING) |
//+----------------------------------------------------------------------------+ //+----------------------------------------------------------------------------+
#ifndef HEADER_UTIL_PREC #ifndef HEADER_UTIL_PLATFORM
#define HEADER_UTIL_PREC #define HEADER_UTIL_PLATFORM
/** @file util/platform.hpp /** @file util/platform.hpp
* *
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#ifdef __linux__ #ifdef __linux__
inline void wxMkDir(const String& str) { inline void wxMkDir(const String& dir) {
wxMkDir(wxConvLocal.cWX2MB(dir), 0777); wxMkDir(wxConvLocal.cWX2MB(dir), 0777);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment