Bartosz Przydatek | 32cdbb2 | 2017-03-23 11:16:36 +0000 | [diff] [blame] | 1 | // 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 | |
tholenst | b429016 | 2020-05-28 00:15:18 -0700 | [diff] [blame] | 23 | #include "absl/status/status.h" |
Thai Duong | 6426e7d | 2018-07-05 09:37:06 -0700 | [diff] [blame] | 24 | |
ambrosin | a1b31d0 | 2023-03-08 06:17:50 -0800 | [diff] [blame] | 25 | #define TINK_USE_ABSL_STATUS |
| 26 | |
Thai Duong | 14f57e6 | 2017-08-29 16:40:37 -0700 | [diff] [blame] | 27 | namespace crypto { |
| 28 | namespace tink { |
Bartosz Przydatek | 32cdbb2 | 2017-03-23 11:16:36 +0000 | [diff] [blame] | 29 | namespace util { |
| 30 | |
lizatretyakova | b040bfc | 2022-02-22 04:59:40 -0800 | [diff] [blame] | 31 | using Status = absl::Status; |
| 32 | |
Bartosz Przydatek | 32cdbb2 | 2017-03-23 11:16:36 +0000 | [diff] [blame] | 33 | // Returns an OK status, equivalent to a default constructed instance. |
| 34 | inline Status OkStatus() { return Status(); } |
| 35 | |
| 36 | } // namespace util |
Thai Duong | 14f57e6 | 2017-08-29 16:40:37 -0700 | [diff] [blame] | 37 | } // namespace tink |
| 38 | } // namespace crypto |
Bartosz Przydatek | 32cdbb2 | 2017-03-23 11:16:36 +0000 | [diff] [blame] | 39 | |
| 40 | #endif // TINK_UTIL_STATUS_H_ |