From b0c950b02aa7eb06e4f46f592bcf43ebc44efe82 Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Mon, 12 Jul 2021 10:35:03 +0400 Subject: [PATCH] Fix -Wunused-function warnings --- ui/widgets/input_fields.cpp | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/ui/widgets/input_fields.cpp b/ui/widgets/input_fields.cpp index f35ce56..ad71419 100644 --- a/ui/widgets/input_fields.cpp +++ b/ui/widgets/input_fields.cpp @@ -163,29 +163,6 @@ bool IsNewline(QChar ch) { return !CheckFullTextTag(textWithTags, tag).isEmpty(); } -QString GetFullSimpleTextTag(const TextWithTags &textWithTags) { - const auto &text = textWithTags.text; - const auto &tags = textWithTags.tags; - const auto tag = (tags.size() == 1) ? tags[0] : TextWithTags::Tag(); - auto from = 0; - auto till = int(text.size()); - for (; from != till; ++from) { - if (!IsNewline(text[from]) && !Text::IsSpace(text[from])) { - break; - } - } - while (till != from) { - if (!IsNewline(text[till - 1]) && !Text::IsSpace(text[till - 1])) { - break; - } - --till; - } - return ((tag.offset <= from) - && (tag.offset + tag.length >= till)) - ? (tag.id == kTagPre ? kTagCode : tag.id) - : QString(); -} - class TagAccumulator { public: TagAccumulator(TextWithTags::Tags &tags) : _tags(tags) {