diff options
author | dec05eba <dec05eba@protonmail.com> | 2021-06-08 13:39:11 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2021-06-08 13:39:11 +0200 |
commit | 0f0bf1c649388c07ae6e8dd784d7402f68691b96 (patch) | |
tree | 22868fcd37cdc15c6d0b6002d85b7c1676b2f34d /src/Entry.cpp | |
parent | da95623137f85b07abf9f56035c23819af1e7fe9 (diff) |
Remove images that are not visible from the loading queue, prepare for inline images
Diffstat (limited to 'src/Entry.cpp')
-rw-r--r-- | src/Entry.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Entry.cpp b/src/Entry.cpp index 7e1b6d9..8e1fbfb 100644 --- a/src/Entry.cpp +++ b/src/Entry.cpp @@ -82,8 +82,8 @@ namespace QuickMedia { text.setEditable(editable); } - void Entry::set_text(std::string new_text) { - text.setString(sf::String::fromUtf8(new_text.data(), new_text.data() + new_text.size())); + void Entry::set_text(const std::string &new_text) { + text.setString(sf::String::fromUtf8(new_text.begin(), new_text.end())); } void Entry::move_caret_to_end() { @@ -91,8 +91,8 @@ namespace QuickMedia { text.moveCaretToEnd(); } - void Entry::append_text(std::string str) { - text.appendText(std::move(str)); + void Entry::append_text(const std::string &str) { + text.appendText(sf::String::fromUtf8(str.begin(), str.end())); } void Entry::replace(size_t start_index, size_t length, const sf::String &insert_str) { |