mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 22:55:11 +00:00
Apply autofixes from clazy
This commit is contained in:
@@ -1579,7 +1579,7 @@ void Link::initDimensions() {
|
||||
int32 Link::resizeGetHeight(int32 width) {
|
||||
_width = qMin(width, _maxw);
|
||||
int32 w = _width - st::linksPhotoSize - st::linksPhotoPadding;
|
||||
for (const auto &link : _links) {
|
||||
for (const auto &link : std::as_const(_links)) {
|
||||
link.lnk->setFullDisplayed(w >= link.width);
|
||||
}
|
||||
|
||||
@@ -1634,7 +1634,7 @@ void Link::paint(Painter &p, const QRect &clip, TextSelection selection, const P
|
||||
}
|
||||
|
||||
p.setPen(st::windowActiveTextFg);
|
||||
for (const auto &link : _links) {
|
||||
for (const auto &link : std::as_const(_links)) {
|
||||
if (clip.intersects(style::rtlrect(left, top, qMin(w, link.width), st::normalFont->height, _width))) {
|
||||
p.setFont(ClickHandler::showAsActive(link.lnk) ? st::normalFont->underline() : st::normalFont);
|
||||
p.drawTextLeft(left, top, _width, (w < link.width) ? st::normalFont->elided(link.text, w) : link.text);
|
||||
|
Reference in New Issue
Block a user