'auto t' can be declared as 'const auto *t'

This commit is contained in:
Michael Kolupaev 2024-12-03 08:55:13 +00:00
parent 224edf3fbe
commit c977d7befd

View File

@ -37,9 +37,9 @@ template <> struct FunctionUnaryArithmeticMonotonicity<NameNegate>
static IFunction::Monotonicity get(const IDataType & original_type, const Field & left, const Field & right)
{
const IDataType * type = &original_type;
if (auto t = typeid_cast<const DataTypeLowCardinality *>(type))
if (const DataTypeLowCardinality * t = typeid_cast<const DataTypeLowCardinality *>(type))
type = t->getDictionaryType().get();
if (auto t = typeid_cast<const DataTypeNullable *>(type))
if (const DataTypeNullable * t = typeid_cast<const DataTypeNullable *>(type))
type = t->getNestedType().get();
/// If the input is signed, assume monotonic.