Add std:: prefix to Windows build
BUG=#392
TEST=unittest
REF_BUG=71969651
REF_CL=185103299
REF_TIME=2018-02-09T16:19:43+09:00
REF_TIME_RAW=1518160783 +0900
Hiroyuki Komatsu
6 years ago
29 | 29 |
|
30 | 30 |
MAJOR=2
|
31 | 31 |
MINOR=23
|
32 | |
BUILD=2804
|
|
32 |
BUILD=2805
|
33 | 33 |
REVISION=102
|
34 | 34 |
# This version represents the version of Mozc IME engine (converter, predictor,
|
35 | 35 |
# etc.). This version info is included both in the Mozc server and in the Mozc
|
131 | 131 |
const int focused_index = candidates.focused_index();
|
132 | 132 |
const int total_items = candidates.size();
|
133 | 133 |
|
134 | |
stringstream footer_string;
|
|
134 |
std::stringstream footer_string;
|
135 | 135 |
footer_string << focused_index + 1
|
136 | 136 |
<< "/"
|
137 | 137 |
<< total_items
|
200 | 200 |
}
|
201 | 201 |
|
202 | 202 |
bool StartServiceInternal(const ScopedSCHandle &service_handle,
|
203 | |
const std::vector<wstring> &arguments) {
|
|
203 |
const std::vector<std::wstring> &arguments) {
|
204 | 204 |
if (arguments.size() <= 0) {
|
205 | 205 |
if (!::StartService(service_handle.get(), 0, NULL)) {
|
206 | 206 |
LOG(ERROR) << "StartService failed: " << ::GetLastError();
|
|
327 | 327 |
// load type is not DISABLED.
|
328 | 328 |
if (state.running() && !now_running &&
|
329 | 329 |
(state.load_type() != cache_service::Win32ServiceState::DISABLED)) {
|
330 | |
std::vector<wstring> arguments(state.arguments_size());
|
|
330 |
std::vector<std::wstring> arguments(state.arguments_size());
|
331 | 331 |
arguments.resize(state.arguments_size());
|
332 | 332 |
for (size_t i = 0; i < state.arguments_size(); ++i) {
|
333 | 333 |
if (Util::UTF8ToWide(state.arguments(i), &arguments[i]) <= 0) {
|
|
512 | 512 |
::Sleep(200); // wait for 0.2sec
|
513 | 513 |
}
|
514 | 514 |
|
515 | |
return StartServiceInternal(service_handle, std::vector<wstring>());
|
|
515 |
return StartServiceInternal(service_handle, std::vector<std::wstring>());
|
516 | 516 |
}
|
517 | 517 |
|
518 | 518 |
bool CacheServiceManager::HasEnoughMemory() {
|
380 | 380 |
// set longer timeout, when the duration is shorter.
|
381 | 381 |
const int duration = static_cast<int>(unlock_time - lock_time);
|
382 | 382 |
const int timeout =
|
383 | |
unlock_time == 0 ? 0 : max(kMinTimeout, kMaxTimeout - max(0, duration));
|
|
383 |
unlock_time == 0 ? 0 : std::max(kMinTimeout,
|
|
384 |
kMaxTimeout - std::max(0, duration));
|
384 | 385 |
|
385 | 386 |
const DWORD result = ::WaitForSingleObject(g_stop_event, timeout);
|
386 | 387 |
switch (result) {
|
72 | 72 |
}
|
73 | 73 |
|
74 | 74 |
void NotifyFatalMessage(const string &msg, int line) {
|
75 | |
ostringstream ostr;
|
|
75 |
std::ostringstream ostr;
|
76 | 76 |
ostr << msg << " (line: " << line << ")";
|
77 | 77 |
NotifyFatalMessageImpl(ostr.str());
|
78 | 78 |
}
|