Skip to content

Commit

Permalink
refactor: 将 std::min 改为一般实现,以兼容 VC 6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
yixy-only committed Apr 7, 2024
1 parent 42fea0b commit 85f23f1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion include/ege/button.h
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,10 @@ class button : public egeControlBase
COLORREF textcolor() const { return _text_color; }

protected:
void updatesidewidth() { _side_width = std::min(geth(), getw()) * 0.2; }
void updatesidewidth()
{
_side_width = ((geth() < getw()) ? geth() : getw()) * 0.2;
}

#ifdef DEBUG
void logout(const char* msg)
Expand Down

0 comments on commit 85f23f1

Please sign in to comment.