aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/protobuf/interop/cast.cpp
diff options
context:
space:
mode:
authorpaxakor <paxakor@yandex-team.ru>2022-02-10 16:47:32 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:47:32 +0300
commit7fdbed62e54b804e2c12b86a2c2bab12f61065df (patch)
tree180a6ae33c1213a60fb42829eccb42cc00fc6955 /library/cpp/protobuf/interop/cast.cpp
parent7199613d295246a07c2f7b331fbb3128936039dc (diff)
downloadydb-7fdbed62e54b804e2c12b86a2c2bab12f61065df.tar.gz
Restoring authorship annotation for <paxakor@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/protobuf/interop/cast.cpp')
-rw-r--r--library/cpp/protobuf/interop/cast.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/library/cpp/protobuf/interop/cast.cpp b/library/cpp/protobuf/interop/cast.cpp
index c4cd59b417..999b48a7cb 100644
--- a/library/cpp/protobuf/interop/cast.cpp
+++ b/library/cpp/protobuf/interop/cast.cpp
@@ -1,23 +1,23 @@
#include <library/cpp/protobuf/interop/cast.h>
-
+
#include <google/protobuf/duration.pb.h>
#include <google/protobuf/timestamp.pb.h>
#include <google/protobuf/util/time_util.h>
-
-namespace NProtoInterop {
- google::protobuf::Duration CastToProto(TDuration duration) {
- return google::protobuf::util::TimeUtil::MicrosecondsToDuration(duration.MicroSeconds());
- }
-
- google::protobuf::Timestamp CastToProto(TInstant instant) {
- return google::protobuf::util::TimeUtil::MicrosecondsToTimestamp(instant.MicroSeconds());
- }
-
- TDuration CastFromProto(const google::protobuf::Duration& duration) {
- return TDuration::MicroSeconds(google::protobuf::util::TimeUtil::DurationToMicroseconds(duration));
- }
-
- TInstant CastFromProto(const google::protobuf::Timestamp& timestamp) {
- return TInstant::MicroSeconds(google::protobuf::util::TimeUtil::TimestampToMicroseconds(timestamp));
- }
-}
+
+namespace NProtoInterop {
+ google::protobuf::Duration CastToProto(TDuration duration) {
+ return google::protobuf::util::TimeUtil::MicrosecondsToDuration(duration.MicroSeconds());
+ }
+
+ google::protobuf::Timestamp CastToProto(TInstant instant) {
+ return google::protobuf::util::TimeUtil::MicrosecondsToTimestamp(instant.MicroSeconds());
+ }
+
+ TDuration CastFromProto(const google::protobuf::Duration& duration) {
+ return TDuration::MicroSeconds(google::protobuf::util::TimeUtil::DurationToMicroseconds(duration));
+ }
+
+ TInstant CastFromProto(const google::protobuf::Timestamp& timestamp) {
+ return TInstant::MicroSeconds(google::protobuf::util::TimeUtil::TimestampToMicroseconds(timestamp));
+ }
+}