@@ -158,7 +158,7 @@ MDTextArea::~MDTextArea() {
158158}
159159
160160void MDTextArea::onLink (CCObject* pSender) {
161- auto href = as <CCString*>(as <CCNode*>(pSender)->getUserObject ());
161+ auto href = static_cast <CCString*>(static_cast <CCNode*>(pSender)->getUserObject ());
162162 auto layer = FLAlertLayer::create (
163163 this , " Hold Up!" ,
164164 " Links are spooky! Are you sure you want to go to <cy>" + std::string (href->getCString ()) +
@@ -170,7 +170,7 @@ void MDTextArea::onLink(CCObject* pSender) {
170170}
171171
172172void MDTextArea::onGDProfile (CCObject* pSender) {
173- auto href = as <CCString*>(as <CCNode*>(pSender)->getUserObject ());
173+ auto href = static_cast <CCString*>(static_cast <CCNode*>(pSender)->getUserObject ());
174174 auto profile = std::string (href->getCString ());
175175 profile = profile.substr (profile.find (" :" ) + 1 );
176176 auto res = numFromString<int >(profile);
@@ -188,7 +188,7 @@ void MDTextArea::onGDProfile(CCObject* pSender) {
188188}
189189
190190void MDTextArea::onGDLevel (CCObject* pSender) {
191- auto href = as <CCString*>(as <CCNode*>(pSender)->getUserObject ());
191+ auto href = static_cast <CCString*>(static_cast <CCNode*>(pSender)->getUserObject ());
192192 auto level = std::string (href->getCString ());
193193 level = level.substr (level.find (" :" ) + 1 );
194194 auto res = numFromString<int >(level);
@@ -208,14 +208,14 @@ void MDTextArea::onGDLevel(CCObject* pSender) {
208208}
209209
210210void MDTextArea::onGeodeMod (CCObject* sender) {
211- auto href = as <CCString*>(as <CCNode*>(sender)->getUserObject ());
211+ auto href = static_cast <CCString*>(static_cast <CCNode*>(sender)->getUserObject ());
212212 auto modID = std::string (href->getCString ());
213213 (void )openInfoPopup (modID.substr (modID.find (" :" ) + 1 ));
214214}
215215
216216void MDTextArea::FLAlert_Clicked (FLAlertLayer* layer, bool btn) {
217217 if (btn) {
218- web::openLinkInBrowser (as <CCString*>(layer->getUserObject ())->getCString ());
218+ web::openLinkInBrowser (static_cast <CCString*>(layer->getUserObject ())->getCString ());
219219 }
220220}
221221
0 commit comments