Revision 15a6ae5cb7d2d7b67ef5704acd01b6f6765fd5d9 authored by Hans Gaiser on 02 August 2016, 09:00:43 UTC, committed by Brad King on 02 August 2016, 19:36:07 UTC
1 parent 55d9bfa
cmLocale.h
/*============================================================================
CMake - Cross Platform Makefile Generator
Copyright 2000-2015 Kitware, Inc., Insight Software Consortium
Distributed under the OSI-approved BSD License (the "License");
see accompanying file Copyright.txt for details.
This software is distributed WITHOUT ANY WARRANTY; without even the
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the License for more information.
============================================================================*/
#ifndef cmLocale_h
#define cmLocale_h
#include "cmStandardIncludes.h"
#include <locale.h>
class cmLocaleRAII
{
const char* OldLocale;
public:
cmLocaleRAII()
: OldLocale(setlocale(LC_CTYPE, CM_NULLPTR))
{
setlocale(LC_CTYPE, "");
}
~cmLocaleRAII() { setlocale(LC_CTYPE, this->OldLocale); }
};
#endif
Computing file changes ...