]> git.tdb.fi Git - libs/gui.git/commitdiff
Add the target type to lexical_cast invocations
authorMikko Rasa <tdb@tdb.fi>
Sat, 1 Dec 2012 09:55:16 +0000 (11:55 +0200)
committerMikko Rasa <tdb@tdb.fi>
Sat, 1 Dec 2012 09:55:16 +0000 (11:55 +0200)
source/graphics/display.cpp
source/input/control.cpp

index da036a1baa9a4174049f40920fd0575e42fc0ceb..588d492b9f64299f7e9aafb61b1f763fa4093777 100644 (file)
@@ -24,7 +24,7 @@ int x_error_handler(Display *display, XErrorEvent *event)
        char err[128];
        XGetErrorText(display, event->error_code, err, sizeof(err));
 
-       string request_code = Msp::lexical_cast(static_cast<int>(event->request_code));
+       string request_code = Msp::lexical_cast<string, int>(event->request_code);
        char req[128];
        XGetErrorDatabaseText(display, "XRequest", request_code.c_str(), request_code.c_str(), req, sizeof(req));
 
index eee0f1523e98256604ca4e0213669134a555c4d1..f3f1919d45815535561932e99c7d23b29b59b16d 100644 (file)
@@ -2,6 +2,8 @@
 #include "control.h"
 #include "device.h"
 
+using namespace std;
+
 namespace Msp {
 namespace Input {
 
@@ -28,7 +30,7 @@ std::string ControlSource::str() const
        else if(type==NONE)
                return "None";
 
-       return lexical_cast(index);
+       return lexical_cast<string>(index);
 }