Commit 175cc670 authored by Stephan Hartmann's avatar Stephan Hartmann Committed by Chromium LUCI CQ

GCC: remove use of (std::stringstream() << x).str()

Operator << of std::stringstream returns a reference to std::ostream
which has no member function str().

Missed while fixing
https://chromium-review.googlesource.com/c/chromium/src/+/2576877

Bug: 819294
Change-Id: Iba035535eaba9bc01c36a74592b6d94956c45498
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2584774
Commit-Queue: Alan Cutter <alancutter@chromium.org>
Reviewed-by: default avatarAlan Cutter <alancutter@chromium.org>
Cr-Commit-Position: refs/heads/master@{#836980}
parent d1e85573
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include "base/no_destructor.h" #include "base/no_destructor.h"
#include "base/path_service.h" #include "base/path_service.h"
#include "base/stl_util.h" #include "base/stl_util.h"
#include "base/strings/strcat.h"
#include "base/task/post_task.h" #include "base/task/post_task.h"
#include "base/task/thread_pool.h" #include "base/task/thread_pool.h"
#include "base/threading/scoped_blocking_call.h" #include "base/threading/scoped_blocking_call.h"
...@@ -101,9 +102,8 @@ LoadedConfigs LoadConfigsBlocking(const base::FilePath& config_dir) { ...@@ -101,9 +102,8 @@ LoadedConfigs LoadConfigsBlocking(const base::FilePath& config_dir) {
std::unique_ptr<base::Value> app_config = std::unique_ptr<base::Value> app_config =
deserializer.Deserialize(nullptr, &error_msg); deserializer.Deserialize(nullptr, &error_msg);
if (!app_config) { if (!app_config) {
result.errors.push_back( result.errors.push_back(base::StrCat(
(std::stringstream() << file << " was not valid JSON: " << error_msg) {file.AsUTF8Unsafe(), " was not valid JSON: ", error_msg}));
.str());
VLOG(1) << result.errors.back(); VLOG(1) << result.errors.back();
continue; continue;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment