mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 13:06:59 -04:00
CMake file
Update to C++ 11: std::shared_ptr, for each loops Update to wxWidgets 3.0+
This commit is contained in:
@@ -146,7 +146,8 @@ void KeywordReminderTextValue::highlight(const String& code, const vector<Script
|
||||
}
|
||||
++pos;
|
||||
} else if (c == _('\\') && in_string && pos + 1 < code.size()) {
|
||||
new_value += c + code.GetChar(pos + 1); // escape code
|
||||
new_value += c;
|
||||
new_value += code.GetChar(pos + 1); // escape code
|
||||
pos += 2;
|
||||
} else if (is_substr(code, pos, _("if ")) && !in_string) {
|
||||
new_value += _("<code-kw>if</code-kw> ");
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <data/card.hpp>
|
||||
#include <util/tagged_string.hpp>
|
||||
#include <data/set.hpp> // for ValueActionPerformer
|
||||
#include <wx/imaglist.h>
|
||||
|
||||
// ----------------------------------------------------------------------------- : ValueAction
|
||||
|
||||
@@ -210,8 +211,9 @@ void TextToggleReminderAction::perform(bool to_undo) {
|
||||
String& val = value.value.mutate();
|
||||
assert(pos + 4 < val.size());
|
||||
size_t end = match_close_tag(val, pos);
|
||||
Char& c = val[pos + 4];
|
||||
swap(c, old);
|
||||
wxUniChar c = old;
|
||||
old = val[pos + 4];
|
||||
val[pos + 4] = c;
|
||||
if (end != String::npos && end + 5 < val.size()) {
|
||||
val[end + 5] = c; // </kw-c>
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@ class TextToggleReminderAction : public ValueAction {
|
||||
private:
|
||||
size_t pos; ///< Position of "<kw-"
|
||||
bool enable; ///< Should the reminder text be turned on or off?
|
||||
Char old; ///< Old value of the <kw- tag
|
||||
wxUniChar old; ///< Old value of the <kw- tag
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------- : Replace all
|
||||
|
||||
Reference in New Issue
Block a user