mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-01-24 13:41:33 -05:00
get rid of make_pair
pair is the same with C++17 Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
parent
b1d96cd1ee
commit
e1fbed0e25
@ -238,11 +238,11 @@ struct TagsEdit::Impl
|
|||||||
auto const e = std::end(tags);
|
auto const e = std::end(tags);
|
||||||
if (cursorVisible()) {
|
if (cursorVisible()) {
|
||||||
auto const m = b + static_cast<std::ptrdiff_t>(editing_index);
|
auto const m = b + static_cast<std::ptrdiff_t>(editing_index);
|
||||||
calcRects(lt, row, r, fm, std::make_pair(b, m));
|
calcRects(lt, row, r, fm, std::pair(b, m));
|
||||||
calcEditorRect(lt, row, r, fm, m);
|
calcEditorRect(lt, row, r, fm, m);
|
||||||
calcRects(lt, row, r, fm, std::make_pair(m + 1, e));
|
calcRects(lt, row, r, fm, std::pair(m + 1, e));
|
||||||
} else {
|
} else {
|
||||||
calcRects(lt, row, r, fm, std::make_pair(b, e));
|
calcRects(lt, row, r, fm, std::pair(b, e));
|
||||||
}
|
}
|
||||||
|
|
||||||
r.setBottom(lt.y() + fm.height() + fm.leading() + tag_inner.top() + tag_inner.bottom() - 1);
|
r.setBottom(lt.y() + fm.height() + fm.leading() + tag_inner.top() + tag_inner.bottom() - 1);
|
||||||
@ -667,8 +667,7 @@ void TagsEdit::paintEvent(QPaintEvent*)
|
|||||||
|
|
||||||
// tags
|
// tags
|
||||||
impl->drawTags(
|
impl->drawTags(
|
||||||
p,
|
p, std::pair(impl->tags.cbegin(), std::next(impl->tags.cbegin(), std::ptrdiff_t(impl->editing_index))));
|
||||||
std::make_pair(impl->tags.cbegin(), std::next(impl->tags.cbegin(), std::ptrdiff_t(impl->editing_index))));
|
|
||||||
|
|
||||||
// draw not terminated tag
|
// draw not terminated tag
|
||||||
auto const formatting = impl->formatting();
|
auto const formatting = impl->formatting();
|
||||||
@ -683,12 +682,10 @@ void TagsEdit::paintEvent(QPaintEvent*)
|
|||||||
|
|
||||||
// tags
|
// tags
|
||||||
impl->drawTags(
|
impl->drawTags(
|
||||||
p,
|
p, std::pair(std::next(impl->tags.cbegin(), std::ptrdiff_t(impl->editing_index + 1)), impl->tags.cend()));
|
||||||
std::make_pair(std::next(impl->tags.cbegin(), std::ptrdiff_t(impl->editing_index + 1)), impl->tags.cend()));
|
|
||||||
} else {
|
} else {
|
||||||
impl->drawTags(p,
|
impl->drawTags(
|
||||||
std::make_pair(EmptySkipIterator(impl->tags.begin(), impl->tags.end()),
|
p, std::pair(EmptySkipIterator(impl->tags.begin(), impl->tags.end()), EmptySkipIterator(impl->tags.end())));
|
||||||
EmptySkipIterator(impl->tags.end())));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user