From 8bceae0a3a173ff81df91a61276ff0af2b892fe4 Mon Sep 17 00:00:00 2001 From: Chris Marsh Date: Tue, 29 Aug 2017 12:42:10 -0700 Subject: [PATCH] autoformat missed these before? --- .../Source/discordrpc/Private/discordrpc.cpp | 41 ++++++------ .../discordrpc/Public/DiscordRpcBlueprint.h | 64 +++++++++++++------ .../Source/discordrpc/Public/discordrpc.h | 14 ++-- .../Source/unrealstatus/unrealstatus.cpp | 2 +- .../Source/unrealstatus/unrealstatus.h | 1 - .../unrealstatus/unrealstatusGameModeBase.cpp | 4 -- .../unrealstatus/unrealstatusGameModeBase.h | 11 +--- 7 files changed, 79 insertions(+), 58 deletions(-) diff --git a/examples/unrealstatus/Plugins/discordrpc/Source/discordrpc/Private/discordrpc.cpp b/examples/unrealstatus/Plugins/discordrpc/Source/discordrpc/Private/discordrpc.cpp index 13e1380..c1829b1 100644 --- a/examples/unrealstatus/Plugins/discordrpc/Source/discordrpc/Private/discordrpc.cpp +++ b/examples/unrealstatus/Plugins/discordrpc/Source/discordrpc/Private/discordrpc.cpp @@ -9,37 +9,42 @@ void FdiscordrpcModule::StartupModule() { - // This code will execute after your module is loaded into memory; the exact timing is specified in the .uplugin file per-module + // This code will execute after your module is loaded into memory; the exact timing is specified + // in the .uplugin file per-module - // Get the base directory of this plugin - FString BaseDir = IPluginManager::Get().FindPlugin("discordrpc")->GetBaseDir(); + // Get the base directory of this plugin + FString BaseDir = IPluginManager::Get().FindPlugin("discordrpc")->GetBaseDir(); - // Add on the relative location of the third party dll and load it - FString LibraryPath; + // Add on the relative location of the third party dll and load it + FString LibraryPath; #if PLATFORM_WINDOWS - LibraryPath = FPaths::Combine(*BaseDir, TEXT("Binaries/ThirdParty/discordrpcLibrary/Win64/discord-rpc.dll")); + LibraryPath = FPaths::Combine( + *BaseDir, TEXT("Binaries/ThirdParty/discordrpcLibrary/Win64/discord-rpc.dll")); #elif PLATFORM_MAC - LibraryPath = FPaths::Combine(*BaseDir, TEXT("Source/ThirdParty/discordrpcLibrary/Mac/Release/libdiscord-rpc.dylib")); + LibraryPath = FPaths::Combine( + *BaseDir, TEXT("Source/ThirdParty/discordrpcLibrary/Mac/Release/libdiscord-rpc.dylib")); #endif // PLATFORM_WINDOWS - DiscordLibraryHandle = !LibraryPath.IsEmpty() ? FPlatformProcess::GetDllHandle(*LibraryPath) : nullptr; + DiscordLibraryHandle = + !LibraryPath.IsEmpty() ? FPlatformProcess::GetDllHandle(*LibraryPath) : nullptr; - if (!DiscordLibraryHandle) - { - FMessageDialog::Open(EAppMsgType::Ok, LOCTEXT("ThirdPartyLibraryError", "Failed to load discord-rpc library")); - } + if (!DiscordLibraryHandle) { + FMessageDialog::Open( + EAppMsgType::Ok, LOCTEXT("ThirdPartyLibraryError", "Failed to load discord-rpc library")); + } } void FdiscordrpcModule::ShutdownModule() { - // This function may be called during shutdown to clean up your module. For modules that support dynamic reloading, - // we call this function before unloading the module. + // This function may be called during shutdown to clean up your module. For modules that + // support dynamic reloading, + // we call this function before unloading the module. - // Free the dll handle - FPlatformProcess::FreeDllHandle(DiscordLibraryHandle); - DiscordLibraryHandle = nullptr; + // Free the dll handle + FPlatformProcess::FreeDllHandle(DiscordLibraryHandle); + DiscordLibraryHandle = nullptr; } #undef LOCTEXT_NAMESPACE - + IMPLEMENT_MODULE(FdiscordrpcModule, discordrpc) \ No newline at end of file diff --git a/examples/unrealstatus/Plugins/discordrpc/Source/discordrpc/Public/DiscordRpcBlueprint.h b/examples/unrealstatus/Plugins/discordrpc/Source/discordrpc/Public/DiscordRpcBlueprint.h index 2e55598..4821b66 100644 --- a/examples/unrealstatus/Plugins/discordrpc/Source/discordrpc/Public/DiscordRpcBlueprint.h +++ b/examples/unrealstatus/Plugins/discordrpc/Source/discordrpc/Public/DiscordRpcBlueprint.h @@ -9,8 +9,16 @@ DECLARE_LOG_CATEGORY_EXTERN(Discord, Log, All); DECLARE_DYNAMIC_MULTICAST_DELEGATE(FDiscordConnected); -DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FDiscordDisconnected, int, errorCode, const FString&, errorMessage); -DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FDiscordErrored, int, errorCode, const FString&, errorMessage); +DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FDiscordDisconnected, + int, + errorCode, + const FString&, + errorMessage); +DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FDiscordErrored, + int, + errorCode, + const FString&, + errorMessage); DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FDiscordJoin, const FString&, joinSecret); DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FDiscordSpectate, const FString&, spectateSecret); @@ -55,45 +63,65 @@ struct FDiscordRichPresence { }; /** - * + * */ UCLASS(BlueprintType, meta = (DisplayName = "Discord RPC"), Category = "Discord") -class DISCORDRPC_API UDiscordRpc : public UObject -{ +class DISCORDRPC_API UDiscordRpc : public UObject { GENERATED_BODY() public: - - UFUNCTION(BlueprintCallable, meta = (DisplayName = "Initialize connection", Keywords = "Discord rpc"), Category = "Discord") + UFUNCTION(BlueprintCallable, + meta = (DisplayName = "Initialize connection", Keywords = "Discord rpc"), + Category = "Discord") void Initialize(const FString& applicationId, bool autoRegister); - - UFUNCTION(BlueprintCallable, meta = (DisplayName = "Shut down connection", Keywords = "Discord rpc"), Category = "Discord") + + UFUNCTION(BlueprintCallable, + meta = (DisplayName = "Shut down connection", Keywords = "Discord rpc"), + Category = "Discord") void Shutdown(); - UFUNCTION(BlueprintCallable, meta = (DisplayName = "Check for callbacks", Keywords = "Discord rpc"), Category = "Discord") + UFUNCTION(BlueprintCallable, + meta = (DisplayName = "Check for callbacks", Keywords = "Discord rpc"), + Category = "Discord") void RunCallbacks(); - UFUNCTION(BlueprintCallable, meta = (DisplayName = "Send presence", Keywords = "Discord rpc"), Category = "Discord") + UFUNCTION(BlueprintCallable, + meta = (DisplayName = "Send presence", Keywords = "Discord rpc"), + Category = "Discord") void UpdatePresence(); - UPROPERTY(BlueprintReadOnly, meta = (DisplayName = "Is Discord connected", Keywords = "Discord rpc"), Category = "Discord") + UPROPERTY(BlueprintReadOnly, + meta = (DisplayName = "Is Discord connected", Keywords = "Discord rpc"), + Category = "Discord") bool IsConnected; - UPROPERTY(BlueprintAssignable, meta = (DisplayName = "On connection", Keywords = "Discord rpc"), Category = "Discord") + UPROPERTY(BlueprintAssignable, + meta = (DisplayName = "On connection", Keywords = "Discord rpc"), + Category = "Discord") FDiscordConnected OnConnected; - UPROPERTY(BlueprintAssignable, meta = (DisplayName = "On disconnection", Keywords = "Discord rpc"), Category = "Discord") + UPROPERTY(BlueprintAssignable, + meta = (DisplayName = "On disconnection", Keywords = "Discord rpc"), + Category = "Discord") FDiscordDisconnected OnDisconnected; - UPROPERTY(BlueprintAssignable, meta = (DisplayName = "On error message", Keywords = "Discord rpc"), Category = "Discord") + UPROPERTY(BlueprintAssignable, + meta = (DisplayName = "On error message", Keywords = "Discord rpc"), + Category = "Discord") FDiscordErrored OnErrored; - UPROPERTY(BlueprintAssignable, meta = (DisplayName = "When Discord user presses join", Keywords = "Discord rpc"), Category = "Discord") + UPROPERTY(BlueprintAssignable, + meta = (DisplayName = "When Discord user presses join", Keywords = "Discord rpc"), + Category = "Discord") FDiscordJoin OnJoin; - UPROPERTY(BlueprintAssignable, meta = (DisplayName = "When Discord user presses spectate", Keywords = "Discord rpc"), Category = "Discord") + UPROPERTY(BlueprintAssignable, + meta = (DisplayName = "When Discord user presses spectate", Keywords = "Discord rpc"), + Category = "Discord") FDiscordSpectate OnSpectate; - UPROPERTY(BlueprintReadWrite, meta = (DisplayName = "Rich presence info", Keywords = "Discord rpc"), Category = "Discord") + UPROPERTY(BlueprintReadWrite, + meta = (DisplayName = "Rich presence info", Keywords = "Discord rpc"), + Category = "Discord") FDiscordRichPresence RichPresence; }; diff --git a/examples/unrealstatus/Plugins/discordrpc/Source/discordrpc/Public/discordrpc.h b/examples/unrealstatus/Plugins/discordrpc/Source/discordrpc/Public/discordrpc.h index d57a91c..8a9323c 100644 --- a/examples/unrealstatus/Plugins/discordrpc/Source/discordrpc/Public/discordrpc.h +++ b/examples/unrealstatus/Plugins/discordrpc/Source/discordrpc/Public/discordrpc.h @@ -4,15 +4,13 @@ #include "ModuleManager.h" -class FdiscordrpcModule : public IModuleInterface -{ +class FdiscordrpcModule : public IModuleInterface { public: - - /** IModuleInterface implementation */ - virtual void StartupModule() override; - virtual void ShutdownModule() override; + /** IModuleInterface implementation */ + virtual void StartupModule() override; + virtual void ShutdownModule() override; private: - /** Handle to the test dll we will load */ - void* DiscordLibraryHandle; + /** Handle to the test dll we will load */ + void* DiscordLibraryHandle; }; \ No newline at end of file diff --git a/examples/unrealstatus/Source/unrealstatus/unrealstatus.cpp b/examples/unrealstatus/Source/unrealstatus/unrealstatus.cpp index c5b1746..9dd5388 100644 --- a/examples/unrealstatus/Source/unrealstatus/unrealstatus.cpp +++ b/examples/unrealstatus/Source/unrealstatus/unrealstatus.cpp @@ -3,4 +3,4 @@ #include "unrealstatus.h" #include "Modules/ModuleManager.h" -IMPLEMENT_PRIMARY_GAME_MODULE( FDefaultGameModuleImpl, unrealstatus, "unrealstatus" ); +IMPLEMENT_PRIMARY_GAME_MODULE(FDefaultGameModuleImpl, unrealstatus, "unrealstatus"); diff --git a/examples/unrealstatus/Source/unrealstatus/unrealstatus.h b/examples/unrealstatus/Source/unrealstatus/unrealstatus.h index 90aad9e..73407dd 100644 --- a/examples/unrealstatus/Source/unrealstatus/unrealstatus.h +++ b/examples/unrealstatus/Source/unrealstatus/unrealstatus.h @@ -3,4 +3,3 @@ #pragma once #include "CoreMinimal.h" - diff --git a/examples/unrealstatus/Source/unrealstatus/unrealstatusGameModeBase.cpp b/examples/unrealstatus/Source/unrealstatus/unrealstatusGameModeBase.cpp index bdeb26a..1af3094 100644 --- a/examples/unrealstatus/Source/unrealstatus/unrealstatusGameModeBase.cpp +++ b/examples/unrealstatus/Source/unrealstatus/unrealstatusGameModeBase.cpp @@ -1,7 +1,3 @@ // Fill out your copyright notice in the Description page of Project Settings. #include "unrealstatusGameModeBase.h" - - - - diff --git a/examples/unrealstatus/Source/unrealstatus/unrealstatusGameModeBase.h b/examples/unrealstatus/Source/unrealstatus/unrealstatusGameModeBase.h index c478465..8dd9bd4 100644 --- a/examples/unrealstatus/Source/unrealstatus/unrealstatusGameModeBase.h +++ b/examples/unrealstatus/Source/unrealstatus/unrealstatusGameModeBase.h @@ -7,14 +7,9 @@ #include "unrealstatusGameModeBase.generated.h" /** - * + * */ UCLASS() -class UNREALSTATUS_API AunrealstatusGameModeBase : public AGameModeBase -{ - GENERATED_BODY() - - - - +class UNREALSTATUS_API AunrealstatusGameModeBase : public AGameModeBase { + GENERATED_BODY() };