diff options
author | paxakor <paxakor@yandex-team.ru> | 2022-02-10 16:47:32 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:47:32 +0300 |
commit | 40d35c046ee3a61ee2a581f42499c5ce56ac589a (patch) | |
tree | c0748b5dcbade83af788c0abfa89c0383d6b779c /library/cpp/protobuf/interop/cast.cpp | |
parent | 7fdbed62e54b804e2c12b86a2c2bab12f61065df (diff) | |
download | ydb-40d35c046ee3a61ee2a581f42499c5ce56ac589a.tar.gz |
Restoring authorship annotation for <paxakor@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/protobuf/interop/cast.cpp')
-rw-r--r-- | library/cpp/protobuf/interop/cast.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/library/cpp/protobuf/interop/cast.cpp b/library/cpp/protobuf/interop/cast.cpp index 999b48a7cb..c4cd59b417 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)); + } +} |