From 90dc11410be03349bccab9e0c416c7589dc7bfb3 Mon Sep 17 00:00:00 2001 From: Pecon Date: Tue, 11 Aug 2020 15:13:56 -0700 Subject: [PATCH 1/2] Followup commit to switch to engine conventions --- .../platformX86UNIX/x86UNIXPlatform.cpp | 31 ++++++++++--------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/Engine/source/platformX86UNIX/x86UNIXPlatform.cpp b/Engine/source/platformX86UNIX/x86UNIXPlatform.cpp index 2e6011c49..bd656de1f 100644 --- a/Engine/source/platformX86UNIX/x86UNIXPlatform.cpp +++ b/Engine/source/platformX86UNIX/x86UNIXPlatform.cpp @@ -1,26 +1,27 @@ #include "platform/platform.h" -#include -bool Platform::openWebBrowser( const char* webAddress ) +bool Platform::openWebBrowser(const char* webAddress) { - std::string startingURL(webAddress); - std::string filteredURL; + String startingURL(webAddress); + String filteredURL; - unsigned short length = startingURL.length(); - for(unsigned short i = 0; i < length; i++) - { - filteredURL = filteredURL + '\\' + startingURL.at(i); - } + U16 length = startingURL.length(); + for(U16 i = 0; i < length; i++) + { + filteredURL = filteredURL + '\\' + startingURL[i]; + } - std::string runCommand = "URL=" + filteredURL + "; xdg-open $URL > /dev/null 2> /dev/null"; + String runCommand = "URL=" + filteredURL + "; xdg-open $URL > /dev/null 2> /dev/null"; - short statusCode; - statusCode = system(runCommand.c_str()); + S16 statusCode; + statusCode = system(runCommand.c_str()); - if(statusCode == 0) - return true; + if(statusCode == 0) + { + return true; + } - return false; + return false; } #ifdef TORQUE_DEDICATED From 909892f40ea482275a2db83dc21887badfb4bca5 Mon Sep 17 00:00:00 2001 From: Pecon Date: Tue, 11 Aug 2020 15:27:52 -0700 Subject: [PATCH 2/2] Change shorts to ints --- Engine/source/platformX86UNIX/x86UNIXPlatform.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Engine/source/platformX86UNIX/x86UNIXPlatform.cpp b/Engine/source/platformX86UNIX/x86UNIXPlatform.cpp index bd656de1f..d43940861 100644 --- a/Engine/source/platformX86UNIX/x86UNIXPlatform.cpp +++ b/Engine/source/platformX86UNIX/x86UNIXPlatform.cpp @@ -5,15 +5,15 @@ bool Platform::openWebBrowser(const char* webAddress) String startingURL(webAddress); String filteredURL; - U16 length = startingURL.length(); - for(U16 i = 0; i < length; i++) + U32 length = startingURL.length(); + for(U32 i = 0; i < length; i++) { filteredURL = filteredURL + '\\' + startingURL[i]; } String runCommand = "URL=" + filteredURL + "; xdg-open $URL > /dev/null 2> /dev/null"; - S16 statusCode; + S32 statusCode; statusCode = system(runCommand.c_str()); if(statusCode == 0)