ManaPlus
anonymous_namespace{buydialog.cpp}
SortItemNameFunctor
Public Member Functions
anonymous_namespace{buydialog.cpp}::SortItemNameFunctor Class Reference
Public Member Functions
bool
operator()
(const
ShopItem
*const item1, const
ShopItem
*const item2) const
Detailed Description
Definition at line
92
of file
buydialog.cpp
.
Member Function Documentation
◆
operator()()
bool anonymous_namespace{buydialog.cpp}::SortItemNameFunctor::operator()
(
const
ShopItem
*const
item1
,
const
ShopItem
*const
item2
)
const
inline
Definition at line
97
of file
buydialog.cpp
.
99
{
100
if
((item1 ==
nullptr
) || (item2 ==
nullptr
))
101
return
false
;
102
103
const
std::string &name1 = item1->
getDisplayName
();
104
const
std::string &name2 = item2->
getDisplayName
();
105
if
(name1 == name2)
106
return
item1->
getPrice
() < item2->
getPrice
();
107
return
name1 < name2;
108
}
ShopItem::getDisplayName
const std::string & getDisplayName() const
Definition:
shopitem.h:140
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