mirror of
https://pdfium.googlesource.com/pdfium
synced 2026-08-02 20:37:52 +08:00
Since absl::optional is using std::optional underneath, just switch to using std::optional directly. Change-Id: Ide39da5ac9c7551a710e653a60e15f022046df7b Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/116290 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Thomas Sepez <tsepez@google.com>
27 lines
590 B
C++
27 lines
590 B
C++
// Copyright 2021 The PDFium Authors
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
#ifndef TESTING_SCOPED_SET_TZ_H_
|
|
#define TESTING_SCOPED_SET_TZ_H_
|
|
|
|
#include <optional>
|
|
#include <string>
|
|
|
|
#include "core/fxcrt/fx_memory.h"
|
|
|
|
class ScopedSetTZ {
|
|
public:
|
|
FX_STACK_ALLOCATED();
|
|
|
|
explicit ScopedSetTZ(const std::string& tz);
|
|
ScopedSetTZ(const ScopedSetTZ&) = delete;
|
|
ScopedSetTZ& operator=(const ScopedSetTZ&) = delete;
|
|
~ScopedSetTZ();
|
|
|
|
private:
|
|
std::optional<std::string> old_tz_;
|
|
};
|
|
|
|
#endif // TESTING_SCOPED_SET_TZ_H_
|