mirror of
https://github.com/edubart/otclient.git
synced 2025-10-17 04:53:27 +02:00
Rework stdext classes
Implement new classes: * stdext::any => ligher replacement for boost::any * stdext::packed_any => like any but optimized to use less memory * stdext::shared_object => ligher replacement for std::shared_ptr * stdext::shared_object_ptr => replacement for boost::intrusive_ptr * stdext::fast_storage => for storing dynamic data * stdext::packed_storage => same but with less memory * stdext::packed_vector => std::vector with less memory Compiling should be a little faster now because global boost including is not needed anymore
This commit is contained in:
@@ -948,7 +948,7 @@ std::string WIN32Window::getClipboardText()
|
||||
if(hglb) {
|
||||
LPTSTR lptstr = (LPTSTR)GlobalLock(hglb);
|
||||
if(lptstr) {
|
||||
text = stdext::utf8StringToLatin1((uchar*)lptstr);
|
||||
text = stdext::utf8_to_latin1((uchar*)lptstr);
|
||||
GlobalUnlock(hglb);
|
||||
}
|
||||
}
|
||||
|
@@ -1037,7 +1037,7 @@ std::string X11Window::getClipboardText()
|
||||
|
||||
// hack to wait SelectioNotify event, otherwise we will get wrong clipboard pastes
|
||||
// TODO: fix this in a correct way
|
||||
usleep(100 * 1000);
|
||||
stdext::millisleep(100);
|
||||
|
||||
// check for data
|
||||
Atom type;
|
||||
@@ -1052,7 +1052,7 @@ std::string X11Window::getClipboardText()
|
||||
&bytesLeft,
|
||||
&data);
|
||||
if(len > 0) {
|
||||
clipboardText = stdext::utf8StringToLatin1(data);
|
||||
clipboardText = stdext::utf8_to_latin1(data);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user