Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
scoped_locale.cc
Go to the documentation of this file.
1// Copyright 2024 The PDFium Authors
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "testing/scoped_locale.h"
6
7#include <locale.h>
8
9#include "core/fxcrt/check_op.h"
10
11namespace pdfium {
12
13ScopedLocale::ScopedLocale(const std::string& locale) {
14 prev_locale_ = setlocale(LC_ALL, nullptr);
15 CHECK(setlocale(LC_ALL, locale.c_str()) != nullptr);
16}
17
19 CHECK_EQ(prev_locale_, setlocale(LC_ALL, prev_locale_.c_str()));
20}
21
22} // namespace pdfium
#define CHECK_EQ(x, y)
Definition check_op.h:10
ScopedLocale(const std::string &locale)
#define CHECK(cvref)