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

Unified Diff: ppapi/examples/ime/ime.cc

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh Created 7 years, 8 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
« no previous file with comments | « ppapi/cpp/dev/text_input_dev.cc ('k') | ppapi/native_client/src/trusted/plugin/plugin.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/examples/ime/ime.cc
diff --git a/ppapi/examples/ime/ime.cc b/ppapi/examples/ime/ime.cc
index f5e2e44f858a365d7eda43e3d7fda6e94d69b16a..6f3e65569aaba38f60f6a8fa4ba4a6e5bd3f7d0e 100644
--- a/ppapi/examples/ime/ime.cc
+++ b/ppapi/examples/ime/ime.cc
@@ -245,7 +245,7 @@ class MyTextField {
int32_t target_segment,
const std::pair<uint32_t, uint32_t>& selection) {
if (HasSelection() && !text.empty())
- InsertText("");
+ InsertText(std::string());
composition_ = text;
segments_ = segments;
target_segment_ = target_segment;
@@ -344,7 +344,7 @@ class MyTextField {
if (!Focused())
return;
if (HasSelection()) {
- InsertText("");
+ InsertText(std::string());
} else {
size_t i = GetNextCharOffsetUtf8(utf8_text_, caret_pos_);
utf8_text_.erase(caret_pos_, i - caret_pos_);
@@ -356,7 +356,7 @@ class MyTextField {
if (!Focused())
return;
if (HasSelection()) {
- InsertText("");
+ InsertText(std::string());
} else if (caret_pos_ != 0) {
size_t i = GetPrevCharOffsetUtf8(utf8_text_, caret_pos_);
utf8_text_.erase(i, caret_pos_ - i);
@@ -565,8 +565,10 @@ class MyInstance : public pp::Instance {
it != textfield_.end();
++it) {
if (it->Focused()) {
- it->SetComposition("", std::vector< std::pair<uint32_t, uint32_t> >(),
- 0, std::make_pair(0, 0));
+ it->SetComposition(std::string(),
+ std::vector<std::pair<uint32_t, uint32_t> >(),
+ 0,
+ std::make_pair(0, 0));
return true;
}
}
« no previous file with comments | « ppapi/cpp/dev/text_input_dev.cc ('k') | ppapi/native_client/src/trusted/plugin/plugin.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698