diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-12-09 17:45:40 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-12-09 17:51:21 +0100 |
commit | 6f4c380d95429ef4615f0a9f40d6fec9e1469764 (patch) | |
tree | 545bbb6260bcbf427e48e98fd6bbebb989bf0590 /Applications/Help/main.cpp | |
parent | 1726c17d0d4325f11124e270ae1658110af606d0 (diff) | |
download | serenity-6f4c380d95429ef4615f0a9f40d6fec9e1469764.zip |
AK: Use size_t for the length of strings
Using int was a mistake. This patch changes String, StringImpl,
StringView and StringBuilder to use size_t instead of int for lengths.
Obviously a lot of code needs to change as a result of this.
Diffstat (limited to 'Applications/Help/main.cpp')
-rw-r--r-- | Applications/Help/main.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Applications/Help/main.cpp b/Applications/Help/main.cpp index c21907ad7c..391bb73401 100644 --- a/Applications/Help/main.cpp +++ b/Applications/Help/main.cpp @@ -56,7 +56,7 @@ int main(int argc, char* argv[]) go_forward_action->set_enabled(history.can_go_forward()); }; - auto open_page = [&](String path) { + auto open_page = [&](const String& path) { if (path.is_null()) { html_view->set_document(nullptr); return; @@ -73,7 +73,7 @@ int main(int argc, char* argv[]) return; } auto buffer = file->read_all(); - StringView source { (char*)buffer.data(), buffer.size() }; + StringView source { (const char*)buffer.data(), (size_t)buffer.size() }; MDDocument md_document; bool success = md_document.parse(source); |