Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1167)

Unified Diff: third_party/WebKit/Source/platform/image-decoders/ImageDecoderTestHelpers.cpp

Issue 2143483002: Use the single char overload of append() when possible. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/image-decoders/ImageDecoderTestHelpers.cpp
diff --git a/third_party/WebKit/Source/platform/image-decoders/ImageDecoderTestHelpers.cpp b/third_party/WebKit/Source/platform/image-decoders/ImageDecoderTestHelpers.cpp
index 6e11a8953b39f1f107615b68bee2f6268543a0dd..af147d132f052cf22f515db25b8bd58e28cf0113 100644
--- a/third_party/WebKit/Source/platform/image-decoders/ImageDecoderTestHelpers.cpp
+++ b/third_party/WebKit/Source/platform/image-decoders/ImageDecoderTestHelpers.cpp
@@ -10,6 +10,7 @@
#include "platform/testing/UnitTestHelpers.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "wtf/StringHasher.h"
+#include "wtf/text/StringBuilder.h"
#include <memory>
namespace blink {
@@ -23,13 +24,13 @@ PassRefPtr<SharedBuffer> readFile(const char* fileName)
PassRefPtr<SharedBuffer> readFile(const char* dir, const char* fileName)
{
- String filePath = testing::blinkRootDir();
- filePath.append("/");
+ StringBuilder filePath;
+ filePath.append(testing::blinkRootDir());
+ filePath.append('/');
filePath.append(dir);
- filePath.append("/");
+ filePath.append('/');
filePath.append(fileName);
-
- return testing::readFromFile(filePath);
+ return testing::readFromFile(filePath.toString());
}
unsigned hashBitmap(const SkBitmap& bitmap)

Powered by Google App Engine
This is Rietveld 408576698