refactor(MenuWorld): code refactor for stddlg

Change-Id: Id73404d29ea75f61663e0306eeeb559286d77281
Reviewed-on: https://review.haiku-os.org/c/1072
Reviewed-by: Adrien Destugues <[email protected]>
This commit is contained in:
harsh jain
2019-02-24 19:46:30 +00:00
committed by waddlesplash
parent fcffcb1576
commit 7495b57bcc
@@ -12,18 +12,17 @@
*/ */
#include <Alert.h> #include <Alert.h>
#include <string.h> #include <String.h>
#include "constants.h" #include "constants.h"
#include "stddlg.h" #include "stddlg.h"
void ierror(const char* msg) void ierror(const char* msg)
{ {
char* fullMsg = new char[strlen(STR_IERROR) + strlen(msg) + 1]; BString fullMsg(STR_IERROR);
strcpy(fullMsg, STR_IERROR); fullMsg << msg;
strcpy(fullMsg, msg);
BAlert alert("Internal Error", fullMsg, "OK", NULL, NULL, BAlert alert("Internal Error", fullMsg, "OK", NULL, NULL,
B_WIDTH_AS_USUAL, B_STOP_ALERT); B_WIDTH_AS_USUAL, B_STOP_ALERT);
alert.Go(); alert.Go();
delete [] fullMsg;
} }