fix compile

This commit is contained in:
GenevensiS
2026-04-01 14:36:57 +02:00
parent 87dbb2d7aa
commit bb4e8c558e
14 changed files with 38 additions and 37 deletions
+1 -1
View File
@@ -86,7 +86,7 @@ void AddCardAction::perform(bool to_undo) {
// Add or remove cards
action.perform(set.cards, to_undo);
// Update card links
for (int i = 0; i < card_link_actions.size(); ++i) {
for (size_t i = 0; i < card_link_actions.size(); ++i) {
card_link_actions[i]->perform(to_undo);
}
}
+2 -2
View File
@@ -300,7 +300,7 @@ double ssqrt(double x) {
}
// Remove a single control point
class SinglePointRemoveAction : public Action, public IntrusivePtrBase<SinglePointRemoveAction> {
class SinglePointRemoveAction : public Action {
public:
SinglePointRemoveAction(const SymbolShapeP& shape, UInt position);
@@ -398,7 +398,7 @@ private:
};
ControlPointRemoveAction::ControlPointRemoveAction(const SymbolShapeP& shape, const set<ControlPointP>& to_delete) {
int index = 0;
UInt index = 0;
// find points to remove, in reverse order
FOR_EACH(point, shape->points) {
if (to_delete.find(point) != to_delete.end()) {
+6 -6
View File
@@ -113,7 +113,7 @@ unique_ptr<TextValueAction> toggle_format_action(const TextValueP& value, vector
size_t untagged_end_i = to_untagged_pos(new_value, end_i);
int offset = 0;
// Compute the changes
for (int i = 0; i < tags.size() ; ++i) {
for (size_t i = 0; i < tags.size() ; ++i) {
const String& tag = tags[i];
new_value = tag.Contains(":") ? compute_new_variable_value(new_value, tag, start_i, end_i):
tag == _("li") ? compute_new_bullet_value (new_value, offset, start_i, end_i):
@@ -204,7 +204,7 @@ String compute_new_variable_value(const String& str, const String& tag, size_t s
if (end_i != String::npos) end_i++;
}
String prefix(substr(str, 0, start_i));
String suffix = end_i == String::npos ? String() : substr(str, end_i);
String suffix = end_i == String::npos ? String() : String(substr(str, end_i));
String selection(substr(str, start_i, end_i - start_i));
// tally open tags that are variants of this tag
@@ -259,7 +259,7 @@ String compute_new_variable_value(const String& str, const String& tag, size_t s
selection = wrap_tag(selection, _("<") + tag + _(">"));
// add the tallied open and close tags
for (int i = 0; i < tag_list.size() ; ++i) {
for (size_t i = 0; i < tag_list.size() ; ++i) {
String& new_tag = tag_list[i];
int count = tag_map[new_tag];
if (count > 0) {
@@ -287,9 +287,9 @@ String compute_new_bullet_value(const String& str, int& offset, size_t start_i,
min(str.find(_("<line"), end_i),
str.find(_("<soft-line"), end_i))))));
String prefix(substr(str, 0, start_i));
String suffix = end_i == String::npos ? String() : substr(str, end_i);
String suffix = end_i == String::npos ? String() : String(substr(str, end_i));
String selection(substr(str, start_i, end_i - start_i));
selection = _("<li><bullet>• </bullet>") + selection + _("</li>");
selection = wxString::FromUTF8("<li><bullet>• </bullet>") + selection + _("</li>");
offset += 1;
return prefix + selection + suffix;
}
@@ -299,7 +299,7 @@ String compute_new_bullet_value(const String& str, int& offset, size_t start_i,
end_i = str.find(_("</li>"), start_tag);
if (end_i != String::npos) end_i += 5;
String prefix(substr(str, 0, start_i));
String suffix = end_i == String::npos ? String() : substr(str, end_i);
String suffix = end_i == String::npos ? String() : String(substr(str, end_i));
String selection(substr(str, start_i, end_i - start_i));
selection = remove_tag(remove_tag_contents(selection, _("<bullet>")), _("<bullet>"));
selection = remove_tag(selection, _("<li>"));
+1 -1
View File
@@ -156,7 +156,7 @@ void Card::updateLinkedUID(const String& old_uid, const String& new_uid) {
vector<CardP> Card::getLinkedRelationCards(const vector<CardP>& cards, const String& linked_relation, bool erase_if_no_card) {
vector<CardP> other_cards;
vector<int> indexes = findRelationLinks(linked_relation);
for (int i = 0; i < indexes.size(); ++i) {
for (size_t i = 0; i < indexes.size(); ++i) {
String& linked_uid = getLinkedUID(indexes[i]);
CardP other_card = getUIDCard(cards, linked_uid);
if (other_card) other_cards.push_back(other_card);
+1 -1
View File
@@ -198,7 +198,7 @@ Image export_image(const SetP& set,
}
// Write metadata
String metadata = _("<mse-card-data>[");
for (int i = 0; i < cards.size(); ++i) {
for (size_t i = 0; i < cards.size(); ++i) {
if (i > 0) metadata += _(",");
CardP card = cards[i];
bool rotated = is_rad90(angles[i]) || is_rad270(angles[i]); // we stored width and height after rotation, but export_metadata expects them before rotation