diff options
author | Andreas Kling <kling@serenityos.org> | 2020-03-01 12:35:09 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-03-01 12:58:22 +0100 |
commit | 22d0a6d92f9e5a93b248eef0609d40ecb332f869 (patch) | |
tree | 6ec543d38dbeda281c6719ae5cc33ef3eb47c496 /Userland | |
parent | fee20bd8de0f9c4222f7123f5c6ea31f00221d7b (diff) | |
download | serenity-22d0a6d92f9e5a93b248eef0609d40ecb332f869.zip |
AK: Remove unnecessary casts to size_t, after Vector changes
Now that Vector uses size_t, we can remove a whole bunch of redundant
casts to size_t.
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/man.cpp | 2 | ||||
-rw-r--r-- | Userland/md.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Userland/man.cpp b/Userland/man.cpp index 055961bd2e..47c3d7d9d9 100644 --- a/Userland/man.cpp +++ b/Userland/man.cpp @@ -97,7 +97,7 @@ int main(int argc, char* argv[]) dbg() << "Loading man page from " << file->filename(); auto buffer = file->read_all(); - String source { (const char*)buffer.data(), (size_t)buffer.size() }; + auto source = String::copy(buffer); printf("%s(%s)\t\tSerenityOS manual\n", name, section); diff --git a/Userland/md.cpp b/Userland/md.cpp index 50297ba47a..f0f5ee576e 100644 --- a/Userland/md.cpp +++ b/Userland/md.cpp @@ -68,7 +68,7 @@ int main(int argc, char* argv[]) auto buffer = file->read_all(); dbg() << "Read size " << buffer.size(); - String input { (const char*)buffer.data(), (size_t)buffer.size() }; + auto input = String::copy(buffer); MDDocument document; success = document.parse(input); |