aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvgeny Grechnikov <diamondaz@yandex.ru>2022-02-22 19:30:28 +0300
committerEvgeny Grechnikov <diamondaz@yandex.ru>2022-02-22 19:30:28 +0300
commit958ccb82c78a47b450486423eddaffed6c2e69de (patch)
tree18d40b575d0fb5fa3392920a8312b7c33338899f
parent16bef245781f24c63adf7d00d040068ce628ffff (diff)
downloadydb-958ccb82c78a47b450486423eddaffed6c2e69de.tar.gz
make constructor explicit
ref:d37b0645d455208e882d5fbf3895e527328601c3
-rw-r--r--library/cpp/cache/cache.h10
-rw-r--r--ydb/core/kqp/kqp_compile_service.cpp2
2 files changed, 6 insertions, 6 deletions
diff --git a/library/cpp/cache/cache.h b/library/cpp/cache/cache.h
index 22075fd94f..6f496305e2 100644
--- a/library/cpp/cache/cache.h
+++ b/library/cpp/cache/cache.h
@@ -30,15 +30,15 @@ public:
public:
struct TItem: public TIntrusiveListItem<TItem> {
typedef TIntrusiveListItem<TItem> TBase;
- // universal reference for TKey here prevents TItem(TItem&) from compiling,
+ // universal reference for TKey here prevents TItem(/*non-const*/ TItem&) from compiling,
// so explicitly specify const TKey& and TKey&&
- TItem(const TKey& key)
+ explicit TItem(const TKey& key)
: TBase()
, Key(key)
, Value()
{
}
- TItem(TKey&& key)
+ explicit TItem(TKey&& key)
: TBase()
, Key(std::move(key))
, Value()
@@ -295,13 +295,13 @@ public:
}
struct TItem {
- TItem(const TKey& key)
+ explicit TItem(const TKey& key)
: Key(key)
, Value()
, Weight(TWeighter::Weight(Value))
{
}
- TItem(TKey&& key)
+ explicit TItem(TKey&& key)
: Key(std::move(key))
, Value()
, Weight(TWeighter::Weight(Value))
diff --git a/ydb/core/kqp/kqp_compile_service.cpp b/ydb/core/kqp/kqp_compile_service.cpp
index da886224a2..08556137ec 100644
--- a/ydb/core/kqp/kqp_compile_service.cpp
+++ b/ydb/core/kqp/kqp_compile_service.cpp
@@ -54,7 +54,7 @@ public:
}
QueryIndex.erase(*removedItem->Value.CompileResult->Query);
- Index.erase(removedItem->Key);
+ Index.erase(*removedItem);
}
Y_VERIFY(List.GetSize() == Index.size());