Advertisement
thespeedy

sop..

Oct 12th, 2015
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.32 KB | None | 0 0
  1. std::string stSort;
  2.     if (!pNode->GetValue("sort", 0, stSort))
  3.     {
  4.         stSort = "None";
  5.     }
  6.  
  7.     if (boost::iequals(stSort, "Asc"))
  8.     {
  9.         std::sort(shopItems.begin(), shopItems.end(), CompareShopItemName);
  10.     }
  11.     else if(boost::iequals(stSort, "Desc"))
  12.     {
  13.         std::sort(shopItems.rbegin(), shopItems.rend(), CompareShopItemName);
  14.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement