ManaPlus
anonymous_namespace{buydialog.cpp}
SortItemIdFunctor
Public Member Functions
anonymous_namespace{buydialog.cpp}::SortItemIdFunctor Class Reference
Public Member Functions
bool
operator()
(const
ShopItem
*const item1, const
ShopItem
*const item2) const
Detailed Description
Definition at line
111
of file
buydialog.cpp
.
Member Function Documentation
◆
operator()()
bool anonymous_namespace{buydialog.cpp}::SortItemIdFunctor::operator()
(
const
ShopItem
*const
item1
,
const
ShopItem
*const
item2
)
const
inline
Definition at line
116
of file
buydialog.cpp
.
118
{
119
if
((item1 ==
nullptr
) || (item2 ==
nullptr
))
120
return
false
;
121
122
const
int
id1 = item1->
getId
();
123
const
int
id2 = item2->
getId
();
124
if
(id1 == id2)
125
return
item1->
getPrice
() < item2->
getPrice
();
126
return
id1 < id2;
127
}
Item::getId
int getId() const
Definition:
item.h:81
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