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

Unified Diff: src/gpu/GrAutoLocaleSetter.h

Issue 1456383002: Fix maybe unintialized warning for GrAutoLocaleSetter (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrAutoLocaleSetter.h
diff --git a/src/gpu/GrAutoLocaleSetter.h b/src/gpu/GrAutoLocaleSetter.h
index 3aa50c9d4d65c8bd59839222025d716bc898c769..bcb23cfb29fd8345cdd8d8239f5d467de437b437 100644
--- a/src/gpu/GrAutoLocaleSetter.h
+++ b/src/gpu/GrAutoLocaleSetter.h
@@ -22,7 +22,7 @@
* Helper class for ensuring that we don't use the wrong locale when building shaders. Android
* doesn't support locale in the NDK, so this is a no-op there.
*/
-class GrAutoLocaleSetter {
+class GrAutoLocaleSetter : public SkNoncopyable {
public:
GrAutoLocaleSetter (const char* name) {
#if defined(SK_BUILD_FOR_WIN)
@@ -32,6 +32,8 @@ public:
fLocale = newlocale(LC_ALL, name, 0);
if (fLocale) {
fOldLocale = uselocale(fLocale);
+ } else {
+ fOldLocale = static_cast<locale_t>(0);
}
#else
(void) name; // suppress unused param warning.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698