From 8deb1305726966b3b583865dec1ba7ba1327d8cb Mon Sep 17 00:00:00 2001 From: Piotr Dziwinski Date: Tue, 3 Dec 2013 00:11:26 +0100 Subject: Changed char[] to std::string in restext Experimental changes --- src/ui/button.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/ui/button.cpp') diff --git a/src/ui/button.cpp b/src/ui/button.cpp index 348382d..810d365 100644 --- a/src/ui/button.cpp +++ b/src/ui/button.cpp @@ -60,12 +60,7 @@ bool CButton::Create(Math::Point pos, Math::Point dim, int icon, EventType event if ( icon == -1 ) { - char name[100]; - char* p; - - GetResource(RES_EVENT, eventType, name); - p = strchr(name, '\\'); - if ( p != 0 ) *p = 0; + std::string name = GetResourceName(eventType); SetName(name); } -- cgit v1.2.3-1-g7c22