Skip to content

Commit

Permalink
Added std:: prefix and removed unnecessary includes
Browse files Browse the repository at this point in the history
BUG=google#392
TEST=unittest
REF_BUG=71969651
REF_CL=184959964
REF_TIME=2018-02-08T18:18:48+09:00
REF_TIME_RAW=1518081528 +0900
  • Loading branch information
hiroyuki-komatsu committed Feb 8, 2018
1 parent 2b890af commit d5f6e54
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 17 deletions.
2 changes: 1 addition & 1 deletion src/base/flags.cc
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ FlagRegister::FlagRegister(const char *name,
flag_->storage = storage;
flag_->default_storage = default_storage;
flag_->help = help;
GetFlagMap()->insert(make_pair(string(name), flag_));
GetFlagMap()->insert(std::make_pair(string(name), flag_));
}

FlagRegister::~FlagRegister() {
Expand Down
2 changes: 1 addition & 1 deletion src/base/process_mutex.cc
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ class NamedLockManager {
~NamedLockManager() {}
bool Lock(const string &filename, const string &message) {
scoped_lock l(&mutex_);
return lock_map_.insert(make_pair(filename, message)).second;
return lock_map_.insert(std::make_pair(filename, message)).second;
}
void UnLock(const string &filename) {
scoped_lock l(&mutex_);
Expand Down
5 changes: 3 additions & 2 deletions src/config/stats_config_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ bool MacStatsConfigUtilImpl::IsEnabled() {
scoped_lock l(&mutex_);
const bool kDefaultValue = false;

ifstream ifs(config_file_.c_str(), ios::binary | ios::in);
ifstream ifs(config_file_.c_str(), std::ios::binary | std::ios::in);

if (!ifs.is_open()) {
return kDefaultValue;
Expand Down Expand Up @@ -213,7 +213,8 @@ bool MacStatsConfigUtilImpl::SetEnabled(bool val) {
if (FileUtil::FileExists(config_file_)) {
::chmod(config_file_.c_str(), S_IRUSR | S_IWUSR); // read/write
}
ofstream ofs(config_file_.c_str(), ios::binary | ios::out | ios::trunc);
ofstream ofs(config_file_.c_str(),
std::ios::binary | std::ios::out | std::ios::trunc);
if (!ofs) {
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion src/data/version/mozc_version_template.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

MAJOR=2
MINOR=23
BUILD=2800
BUILD=2801
REVISION=102
# This version represents the version of Mozc IME engine (converter, predictor,
# etc.). This version info is included both in the Mozc server and in the Mozc
Expand Down
1 change: 0 additions & 1 deletion src/gui/administration_dialog/administration_dialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
#include <QtGui/QtGui>
#include <QtWidgets/QDialog>

#include <string>
#include "gui/administration_dialog/ui_administration_dialog.h"

namespace mozc {
Expand Down
1 change: 0 additions & 1 deletion src/gui/base/debug_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
#ifndef MOZC_GUI_BASE_DEBUG_UTIL_H_
#define MOZC_GUI_BASE_DEBUG_UTIL_H_

#include <string>
#include <QtGui/QGuiApplication>

namespace mozc {
Expand Down
2 changes: 1 addition & 1 deletion src/gui/base/msime_user_dictionary_importer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ class MSIMEImportIterator
for (int i = 0; i < pos_size; ++i) {
EncodingUtil::SJISToUTF8(
reinterpret_cast<char *>(pos_table->szName), &name);
pos_map_.insert(make_pair(pos_table->nPos, name));
pos_map_.insert(std::make_pair(pos_table->nPos, name));
++pos_table;
}

Expand Down
2 changes: 2 additions & 0 deletions src/gui/config_dialog/generic_table_editor.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@

#include <QtWidgets/QWidget>
#include <string>

#include "base/port_string.h"
#include "gui/config_dialog/ui_generic_table_editor.h"

class QAbstractButton;
Expand Down
18 changes: 9 additions & 9 deletions src/win32/base/deleter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -78,25 +78,25 @@ void VKBackBasedDeleter::BeginDeletion(int deletion_count,
*pending_ime_state_ = ime_state;
pending_output_->CopyFrom(output);

wait_queue_->push_back(make_pair(
wait_queue_->push_back(std::make_pair(
WAIT_INITIAL_VK_BACK_TESTDOWN, SEND_KEY_TO_APPLICATION));
wait_queue_->push_back(make_pair(
wait_queue_->push_back(std::make_pair(
WAIT_VK_BACK_TESTUP, SEND_KEY_TO_APPLICATION));

for (int i = 1; i < deletion_count; ++i) {
wait_queue_->push_back(make_pair(
wait_queue_->push_back(std::make_pair(
WAIT_VK_BACK_TESTDOWN, SEND_KEY_TO_APPLICATION));
wait_queue_->push_back(make_pair(
wait_queue_->push_back(std::make_pair(
WAIT_VK_BACK_TESTUP, SEND_KEY_TO_APPLICATION));
}

wait_queue_->push_back(make_pair(
wait_queue_->push_back(std::make_pair(
WAIT_VK_BACK_TESTDOWN, CONSUME_KEY_BUT_NEVER_SEND_TO_SERVER));
wait_queue_->push_back(make_pair(
wait_queue_->push_back(std::make_pair(
WAIT_VK_BACK_DOWN, APPLY_PENDING_STATUS));
wait_queue_->push_back(make_pair(
wait_queue_->push_back(std::make_pair(
WAIT_VK_BACK_TESTUP, CONSUME_KEY_BUT_NEVER_SEND_TO_SERVER));
wait_queue_->push_back(make_pair(
wait_queue_->push_back(std::make_pair(
WAIT_VK_BACK_UP,
CALL_END_DELETION_BUT_NEVER_SEND_TO_SERVER));

Expand Down Expand Up @@ -129,7 +129,7 @@ VKBackBasedDeleter::ClientAction VKBackBasedDeleter::OnKeyEvent(
}

// Hereafter, auto-deletion is ongoing.
const pair<DeletionWaitState, ClientAction> next =
const std::pair<DeletionWaitState, ClientAction> next =
wait_queue_->front();
if (next.first == WAIT_INITIAL_VK_BACK_TESTDOWN) {
if ((vk == VK_BACK) && is_keydown && is_test_key) {
Expand Down

0 comments on commit d5f6e54

Please sign in to comment.