pdfium/testing/scoped_set_tz.h
Lei Zhang 24c6be6924 Switch from absl::optional to std::optional
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>
2024-02-08 20:06:48 +00:00

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_