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

Side by Side Diff: src/gpu/GrAutoLocaleSetter.h

Issue 1842753002: Style bikeshed - remove extraneous whitespace (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « src/gpu/GrAuditTrail.cpp ('k') | src/gpu/GrBlurUtils.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef GrAutoLocaleSetter_DEFINED 8 #ifndef GrAutoLocaleSetter_DEFINED
9 #define GrAutoLocaleSetter_DEFINED 9 #define GrAutoLocaleSetter_DEFINED
10 10
(...skipping 18 matching lines...) Expand all
29 #endif 29 #endif
30 30
31 /** 31 /**
32 * Helper class for ensuring that we don't use the wrong locale when building sh aders. Android 32 * Helper class for ensuring that we don't use the wrong locale when building sh aders. Android
33 * doesn't support locale in the NDK, so this is a no-op there. 33 * doesn't support locale in the NDK, so this is a no-op there.
34 */ 34 */
35 class GrAutoLocaleSetter : public SkNoncopyable { 35 class GrAutoLocaleSetter : public SkNoncopyable {
36 public: 36 public:
37 GrAutoLocaleSetter (const char* name) { 37 GrAutoLocaleSetter (const char* name) {
38 #if defined(SK_BUILD_FOR_WIN) 38 #if defined(SK_BUILD_FOR_WIN)
39 fOldPerThreadLocale = _configthreadlocale(_ENABLE_PER_THREAD_LOCALE); 39 fOldPerThreadLocale = _configthreadlocale(_ENABLE_PER_THREAD_LOCALE);
40 char* oldLocale = setlocale(LC_ALL, name); 40 char* oldLocale = setlocale(LC_ALL, name);
41 if (oldLocale) { 41 if (oldLocale) {
42 fOldLocale = oldLocale; 42 fOldLocale = oldLocale;
43 fShouldRestoreLocale = true; 43 fShouldRestoreLocale = true;
44 } else { 44 } else {
45 fShouldRestoreLocale = false; 45 fShouldRestoreLocale = false;
46 } 46 }
47 #elif HAVE_LOCALE_T 47 #elif HAVE_LOCALE_T
48 fLocale = newlocale(LC_ALL, name, 0); 48 fLocale = newlocale(LC_ALL, name, 0);
49 if (fLocale) { 49 if (fLocale) {
(...skipping 27 matching lines...) Expand all
77 SkString fOldLocale; 77 SkString fOldLocale;
78 #elif HAVE_LOCALE_T 78 #elif HAVE_LOCALE_T
79 locale_t fOldLocale; 79 locale_t fOldLocale;
80 locale_t fLocale; 80 locale_t fLocale;
81 #endif 81 #endif
82 }; 82 };
83 83
84 #undef HAVE_LOCALE_T 84 #undef HAVE_LOCALE_T
85 85
86 #endif 86 #endif
87
OLDNEW
« no previous file with comments | « src/gpu/GrAuditTrail.cpp ('k') | src/gpu/GrBlurUtils.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698