From a72b2d5e5e0990219ffda777907e6341cf574c02 Mon Sep 17 00:00:00 2001 From: Mikael Olsson Date: Mon, 19 Feb 2024 11:35:05 +0100 Subject: 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 --- utils/ethosu_logd/main.cpp | 5 ++--- 1 file 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 * 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) {} -- cgit v1.2.1