From 17f77bb0c7b250181708b77f09d095e01eeaedcc Mon Sep 17 00:00:00 2001 From: ricea Date: Mon, 10 Aug 2015 09:53:15 -0700 Subject: [PATCH] Remove useless use of StringPrintf("%s", ...) std::string has a constructor which accepts a C string, so it is not necessary to use StringPrintf() for this purpose. BUG= TEST=compile Review URL: https://codereview.chromium.org/1274713008 Cr-Commit-Position: refs/heads/master@{#342636} --- content/browser/gamepad/gamepad_platform_data_fetcher_linux.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/browser/gamepad/gamepad_platform_data_fetcher_linux.cc b/content/browser/gamepad/gamepad_platform_data_fetcher_linux.cc index 5441452cbb0a..b3f658e993c6 100644 --- a/content/browser/gamepad/gamepad_platform_data_fetcher_linux.cc +++ b/content/browser/gamepad/gamepad_platform_data_fetcher_linux.cc @@ -151,7 +151,7 @@ void GamepadPlatformDataFetcherLinux::RefreshDevice(udev_device* dev) { // Driver returns utf-8 strings here, so combine in utf-8 first and // convert to WebUChar later once we've picked an id string. const char* name = device::udev_device_get_sysattr_value(dev, "name"); - std::string name_string = base::StringPrintf("%s", name); + std::string name_string(name); // In many cases the information the input subsystem contains isn't // as good as the information that the device bus has, walk up further -- 2.11.4.GIT