ManaPlus
anonymous_namespace{buydialog.cpp}
SortItemAmountFunctor
Public Member Functions
anonymous_namespace{buydialog.cpp}::SortItemAmountFunctor Class Reference
Public Member Functions
bool
operator()
(const
ShopItem
*const item1, const
ShopItem
*const item2) const
Detailed Description
Definition at line
149
of file
buydialog.cpp
.
Member Function Documentation
◆
operator()()
bool anonymous_namespace{buydialog.cpp}::SortItemAmountFunctor::operator()
(
const
ShopItem
*const
item1
,
const
ShopItem
*const
item2
)
const
inline
Definition at line
154
of file
buydialog.cpp
.
156
{
157
if
((item1 ==
nullptr
) || (item2 ==
nullptr
))
158
return
false
;
159
160
const
int
amount1 = item1->
getQuantity
();
161
const
int
amount2 = item2->
getQuantity
();
162
if
(amount1 == amount2)
163
return
item1->
getPrice
() < item2->
getPrice
();
164
return
amount1 < amount2;
165
}
Item::getQuantity
int getQuantity() const
Definition:
item.h:105
ShopItem::getPrice
int getPrice() const
Definition:
shopitem.h:132
The documentation for this class was generated from the following file:
src/gui/windows/
buydialog.cpp (986a3bf)
Generated on Wed Mar 17 2021 19:19:17 for ManaPlus by
1.9.1