From 6d9f18cf6ca165bbbc18f27cea26c0491026ba0c Mon Sep 17 00:00:00 2001 From: silverqx Date: Thu, 15 Dec 2022 11:20:57 +0100 Subject: [PATCH] commented unused code --- include/orm/utils/container.hpp | 56 ++++++++++++++++----------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/include/orm/utils/container.hpp b/include/orm/utils/container.hpp index dd433dc81..048acf738 100644 --- a/include/orm/utils/container.hpp +++ b/include/orm/utils/container.hpp @@ -29,10 +29,10 @@ namespace Orm::Utils static QString join(const T &container, D &&delimiter = Constants::COMMA); - /*! Get a size of the greatest element in the container. */ - template - static SizeType - maxElementSize(const T &container, typename T::size_type addToElement = 0); +// /*! Get a size of the greatest element in the container. */ +// template +// static SizeType +// maxElementSize(const T &container, typename T::size_type addToElement = 0); /*! Count all string sizes in the given container and optionally add value to every string. */ @@ -64,30 +64,30 @@ namespace Orm::Utils return columnized; } - template - SizeType - Container::maxElementSize(const T &container, - const typename T::size_type addToElement) - { - // Nothing to do - if (container.empty()) - return 0; - - SizeType result = 0; - - for (const auto &element : container) - if (const auto elementSize = element.size(); - elementSize > result - ) - result = elementSize; - - /* This is the reason for the addToElement argument, this algorithm returns 0, - if the result is 0. */ - if (result == 0) - return 0; - - return result + addToElement; - } +// template +// SizeType +// Container::maxElementSize(const T &container, +// const typename T::size_type addToElement) +// { +// // Nothing to do +// if (container.empty()) +// return 0; + +// SizeType result = 0; + +// for (const auto &element : container) +// if (const auto elementSize = element.size(); +// elementSize > result +// ) +// result = elementSize; + +// /* This is the reason for the addToElement argument, this algorithm returns 0, +// if the result is 0. */ +// if (result == 0) +// return 0; + +// return result + addToElement; +// } template SizeType