blob: ef5894910345a8efde3e8b6f45039099aec2de7a [file] [log] [blame]
Bartosz Przydatek32cdbb22017-03-23 11:16:36 +00001// Copyright 2017 Google Inc.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14//
15///////////////////////////////////////////////////////////////////////////////
16// This code was unceremoniously lifted from the version at
17// github.com/google/lmctfy with a few minor modifications mainly to reduce the
18// dependencies.
19
20#ifndef TINK_UTIL_STATUS_H_
21#define TINK_UTIL_STATUS_H_
22
tholenstb4290162020-05-28 00:15:18 -070023#include "absl/status/status.h"
Thai Duong6426e7d2018-07-05 09:37:06 -070024
ambrosina1b31d02023-03-08 06:17:50 -080025#define TINK_USE_ABSL_STATUS
26
Thai Duong14f57e62017-08-29 16:40:37 -070027namespace crypto {
28namespace tink {
Bartosz Przydatek32cdbb22017-03-23 11:16:36 +000029namespace util {
30
lizatretyakovab040bfc2022-02-22 04:59:40 -080031using Status = absl::Status;
32
Bartosz Przydatek32cdbb22017-03-23 11:16:36 +000033// Returns an OK status, equivalent to a default constructed instance.
34inline Status OkStatus() { return Status(); }
35
36} // namespace util
Thai Duong14f57e62017-08-29 16:40:37 -070037} // namespace tink
38} // namespace crypto
Bartosz Przydatek32cdbb22017-03-23 11:16:36 +000039
40#endif // TINK_UTIL_STATUS_H_