@@ -89,13 +89,15 @@ bool SearchHistoryNode::init(
8989 buttonMenu->setID (" button-menu" );
9090 addChild (buttonMenu);
9191
92- auto removeButton = CCMenuItemExt::createSpriteExtraWithFrameName (" GJ_deleteBtn_001.png" , 0 .5f , [this , remove = std::move (remove)](auto ) {
92+ auto removeButton = CCMenuItemExt::createSpriteExtraWithFrameName (" GJ_deleteBtn_001.png" , 0 .5f , [
93+ this , remove = std::move (remove)
94+ ](auto ) mutable {
9395 createQuickPopup (
9496 " Remove Search" ,
9597 " Are you sure you want to remove this search history entry?" ,
9698 " No" ,
9799 " Yes" ,
98- [this , remove = std::move (remove)](auto , bool btn2) {
100+ [this , remove = std::move (remove)](auto , bool btn2) mutable {
99101 if (btn2) remove ();
100102 }
101103 );
@@ -104,7 +106,9 @@ bool SearchHistoryNode::init(
104106 removeButton->setID (" remove-button" );
105107 buttonMenu->addChild (removeButton);
106108
107- auto searchButton = CCMenuItemExt::createSpriteExtraWithFrameName (" GJ_undoBtn_001.png" , 0 .6f , [this , search = std::move (search)](auto ) {
109+ auto searchButton = CCMenuItemExt::createSpriteExtraWithFrameName (" GJ_undoBtn_001.png" , 0 .6f , [
110+ this , search = std::move (search)
111+ ](auto ) mutable {
108112 search ();
109113 });
110114 searchButton->setPosition ({ 350 .0f , 25 .0f });
@@ -290,7 +294,7 @@ bool SearchHistoryNode::init(
290294 }
291295 }
292296
293- auto tm = fmt:: localtime (object.time );
297+ auto tm = localtime (object.time );
294298 auto timeLabel = CCLabelBMFont::create (
295299 (h12 ? fmt::format (" {:%Y-%m-%d %I:%M:%S %p}" , tm) : fmt::format (" {:%Y-%m-%d %H:%M:%S}" , tm)).c_str (), " chatFont.fnt" );
296300 timeLabel->setColor (white ? ccColor3B { 255 , 255 , 255 } : ccColor3B { 51 , 51 , 51 });
0 commit comments