diff options
author | Mikael Olsson <mikael.olsson@arm.com> | 2024-02-19 11:35:05 +0100 |
---|---|---|
committer | Mikael Olsson <mikael.olsson@arm.com> | 2024-02-19 13:41:46 +0100 |
commit | a72b2d5e5e0990219ffda777907e6341cf574c02 (patch) | |
tree | 014e60508c3cf09a8fe04098f9392f86862961dc | |
parent | a025eb58ab3fbd9236adaac7e3d5d84962209bac (diff) | |
download | ethos-u-linux-driver-stack-a72b2d5e5e0990219ffda777907e6341cf574c02.tar.gz |
Fix unnecessary string copy in logd
To avoid making unnecessary copies of the path string, it will now use
move semantics.
Change-Id: Iecef1df1929cc9748b5a33f6bed088bfd785acce
Signed-off-by: Mikael Olsson <mikael.olsson@arm.com>
-rw-r--r-- | utils/ethosu_logd/main.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/utils/ethosu_logd/main.cpp b/utils/ethosu_logd/main.cpp index d7ff1eb..1d84caa 100644 --- a/utils/ethosu_logd/main.cpp +++ b/utils/ethosu_logd/main.cpp @@ -1,6 +1,5 @@ /* - * Copyright (c) 2021 Arm Limited. All rights reserved. - * + * SPDX-FileCopyrightText: Copyright 2021, 2024 Arm Limited and/or its affiliates <open-source-office@arm.com> * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the License); you may @@ -40,7 +39,7 @@ void help(const char *prog) { class Path { public: - Path(const std::string path) : path(path) {} + Path(std::string path) : path(std::move(path)) {} Path(const char *path) : path(path) {} |