X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FEvents%2FEvents_Error.cpp;h=4b7670e8ef55e1c54794c6880b01b4191151c7ed;hb=f5c7bb3100ed321392da42f61c2ab505833ec61a;hp=2f606b7f91d7f02cb21dcdff83cc8ab79f1c2cc3;hpb=3874b57fe5aba25ff5aee2a07654fc23c1ee8eb0;p=modules%2Fshaper.git diff --git a/src/Events/Events_Error.cpp b/src/Events/Events_Error.cpp index 2f606b7f9..4b7670e8e 100644 --- a/src/Events/Events_Error.cpp +++ b/src/Events/Events_Error.cpp @@ -10,7 +10,7 @@ #include #include -Events_Error::Events_Error(char* theDescription, const void* theSender) +Events_Error::Events_Error(const std::string& theDescription, const void* theSender) : Events_Message(Events_Error::errorID(), theSender) { myDescription = theDescription; @@ -26,19 +26,14 @@ Events_ID Events_Error::errorID() return aLoop->eventByName("ApplicationError"); } -char* Events_Error::description() const +const char* Events_Error::description() const { - return myDescription; + return myDescription.c_str(); } -void Events_Error::send(char* theDescription, const void* theSender) +void Events_Error::send(const std::string& theDescription, const void* theSender) { std::shared_ptr aNewOne = std::shared_ptr(new Events_Error(theDescription, theSender)); Events_Loop::loop()->send(aNewOne); } - -void Events_Error::send(std::string theDescription, const void* theSender) -{ - Events_Error::send((char*) theDescription.c_str(), theSender); -}