Fix -Wunused-function warnings
This commit is contained in:
parent
3b4dfc26f9
commit
b0c950b02a
1 changed files with 0 additions and 23 deletions
|
|
@ -163,29 +163,6 @@ bool IsNewline(QChar ch) {
|
||||||
return !CheckFullTextTag(textWithTags, tag).isEmpty();
|
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 {
|
class TagAccumulator {
|
||||||
public:
|
public:
|
||||||
TagAccumulator(TextWithTags::Tags &tags) : _tags(tags) {
|
TagAccumulator(TextWithTags::Tags &tags) : _tags(tags) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue