Skip to content

Commit

Permalink
[EN-7412] Implement DXFeedConnect sample
Browse files Browse the repository at this point in the history
  • Loading branch information
ttldtor committed Sep 5, 2023
1 parent f4728f8 commit cc56017
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions include/dxfeed_graal_cpp_api/internal/utils/TimeFormat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,25 +83,26 @@ struct DXFCPP_EXPORT TimeFormat {
ValueType template_{};

public:
MinuteCacheEntry(KeyType minute, const ValueType &templat) noexcept : minute_{minute}, template_{templat} {
MinuteCacheEntry(KeyType minute, ValueType minuteTemplate) noexcept
: minute_{minute}, template_{std::move(minuteTemplate)} {
}

MinuteCacheEntry() noexcept : MinuteCacheEntry(std::numeric_limits<KeyType>::min(), "") {
}

KeyType getKey() const noexcept {
[[nodiscard]] KeyType getKey() const noexcept {
return minute_;
}

const ValueType &getValue() const noexcept {
[[nodiscard]] const ValueType &getValue() const & noexcept {
return template_;
}

KeyType getMinute() const {
[[nodiscard]] KeyType getMinute() const {
return minute_;
}

const ValueType &getTemplate() const {
[[nodiscard]] const ValueType &getTemplate() const & noexcept {
return template_;
}

Expand All @@ -121,17 +122,17 @@ struct DXFCPP_EXPORT TimeFormat {
ValueType value_{};

public:
CacheEntry(KeyType key, const ValueType &value) noexcept : key_{key}, value_{value} {
CacheEntry(KeyType key, ValueType value) noexcept : key_{key}, value_{std::move(value)} {
}

CacheEntry() noexcept : CacheEntry(std::numeric_limits<KeyType>::min(), "") {
}

KeyType getKey() const noexcept {
[[nodiscard]] KeyType getKey() const noexcept {
return key_;
}

const ValueType &getValue() const noexcept {
[[nodiscard]] const ValueType &getValue() const & noexcept {
return value_;
}

Expand Down

0 comments on commit cc56017

Please sign in to comment.