Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/application/StarMainApplication_sdl.cpp
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2024-02-20 09:49:42 +1100
committerGitHub <noreply@github.com>2024-02-20 09:49:42 +1100
commitaa987a217779e71f97ee4c9cce531aec1c861bf8 (patch)
treee51fcce110306d93bf93870f13a5ff7d6b575427 /source/application/StarMainApplication_sdl.cpp
parentd0099a6d790b66f21e4e266e569d64fb82fb0a81 (diff)
parent1c89042016c739815b2d70bcbef4673eef6b63e0 (diff)
Merge branch 'main' into small-fixes
Diffstat (limited to 'source/application/StarMainApplication_sdl.cpp')
-rw-r--r--source/application/StarMainApplication_sdl.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/source/application/StarMainApplication_sdl.cpp b/source/application/StarMainApplication_sdl.cpp
index 48b7fa5..08d3813 100644
--- a/source/application/StarMainApplication_sdl.cpp
+++ b/source/application/StarMainApplication_sdl.cpp
@@ -206,7 +206,7 @@ ControllerButton controllerButtonFromSdlControllerButton(uint8_t button) {
class SdlPlatform {
public:
SdlPlatform(ApplicationUPtr application, StringList cmdLineArgs) {
- m_application = move(application);
+ m_application = std::move(application);
// extract application path from command line args
String applicationPath = cmdLineArgs.first();
@@ -215,7 +215,7 @@ public:
StringList platformArguments;
eraseWhere(cmdLineArgs, [&platformArguments](String& argument) {
if (argument.beginsWith("+platform")) {
- platformArguments.append(move(argument));
+ platformArguments.append(std::move(argument));
return true;
}
return false;
@@ -461,7 +461,7 @@ private:
Maybe<String> string;
if (SDL_HasClipboardText()) {
if (auto text = SDL_GetClipboardText()) {
- if (*text != NULL)
+ if (*text != '\0')
string.emplace(text);
SDL_free(text);
}
@@ -482,7 +482,7 @@ private:
}
void setApplicationTitle(String title) override {
- parent->m_windowTitle = move(title);
+ parent->m_windowTitle = std::move(title);
if (parent->m_sdlWindow)
SDL_SetWindowTitle(parent->m_sdlWindow, parent->m_windowTitle.utf8Ptr());
}
@@ -817,10 +817,10 @@ private:
else
operations = { FlipImageOperation{ FlipImageOperation::Mode::FlipY } };
- auto newImage = std::make_shared<Image>(move(processImageOperations(operations, *image)));
+ auto newImage = std::make_shared<Image>(processImageOperations(operations, *image));
// Fix fully transparent pixels inverting the underlying display pixel on Windows (allowing this could be made configurable per cursor later!)
newImage->forEachPixel([](unsigned x, unsigned y, Vec4B& pixel) { if (!pixel[3]) pixel[0] = pixel[1] = pixel[2] = 0; });
- entry->image = move(newImage);
+ entry->image = std::move(newImage);
auto size = entry->image->size();
@@ -907,7 +907,7 @@ private:
int runMainApplication(ApplicationUPtr application, StringList cmdLineArgs) {
try {
{
- SdlPlatform platform(move(application), move(cmdLineArgs));
+ SdlPlatform platform(std::move(application), std::move(cmdLineArgs));
platform.run();
}
Logger::info("Application: stopped gracefully");