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

Side by Side Diff: tools/win_lcid.cpp

Issue 1316233002: Style Change: NULL->nullptr (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-27 (Thursday) 10:25:06 EDT Created 5 years, 3 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 unified diff | Download patch
« no previous file with comments | « tools/win_dbghelp.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /*
2 * Copyright 2013 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
1 #include "windows.h" 7 #include "windows.h"
2 #include "stdio.h" 8 #include "stdio.h"
3 9
4 #define BUFFER_SIZE 512 10 #define BUFFER_SIZE 512
5 BOOL CALLBACK MyFuncLocaleEx(LPWSTR pStr, DWORD dwFlags, LPARAM lparam) { 11 BOOL CALLBACK MyFuncLocaleEx(LPWSTR pStr, DWORD dwFlags, LPARAM lparam) {
6 WCHAR wcBuffer[BUFFER_SIZE]; 12 WCHAR wcBuffer[BUFFER_SIZE];
7 int bufferSize; 13 int bufferSize;
8 14
9 bufferSize = GetLocaleInfoEx(pStr, LOCALE_SENGLANGUAGE, wcBuffer, BUFFER_SIZ E); 15 bufferSize = GetLocaleInfoEx(pStr, LOCALE_SENGLANGUAGE, wcBuffer, BUFFER_SIZ E);
10 if (bufferSize == 0) { 16 if (bufferSize == 0) {
11 wprintf(L"Locale %s had error %d\n", pStr, GetLastError()); 17 wprintf(L"Locale %s had error %d\n", pStr, GetLastError());
12 return (TRUE); 18 return (TRUE);
13 } 19 }
14 20
15 LCID lcid = LocaleNameToLCID(pStr, NULL); 21 LCID lcid = LocaleNameToLCID(pStr, nullptr);
16 if (lcid == 0) { 22 if (lcid == 0) {
17 wprintf(L"Error %d getting LCID\n", GetLastError()); 23 wprintf(L"Error %d getting LCID\n", GetLastError());
18 return (TRUE); 24 return (TRUE);
19 } 25 }
20 26
21 if (lcid > 0x8000) { 27 if (lcid > 0x8000) {
22 wprintf(L"//"); 28 wprintf(L"//");
23 } 29 }
24 wprintf(L" { 0x%.4x, \"%s\" }, //%s\n", lcid, pStr, wcBuffer); 30 wprintf(L" { 0x%.4x, \"%s\" }, //%s\n", lcid, pStr, wcBuffer);
25 31
26 return (TRUE); 32 return (TRUE);
27 } 33 }
28 34
29 int main(int argc, wchar_t* argv[]) { 35 int main(int argc, wchar_t* argv[]) {
30 EnumSystemLocalesEx(MyFuncLocaleEx, LOCALE_ALL, NULL, NULL); 36 EnumSystemLocalesEx(MyFuncLocaleEx, LOCALE_ALL, nullptr, nullptr);
31 } 37 }
OLDNEW
« no previous file with comments | « tools/win_dbghelp.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698