Skip to content
This repository has been archived by the owner on Nov 1, 2024. It is now read-only.

Make Getters pure for BPs #229

Closed
ufna opened this issue Oct 19, 2019 · 2 comments
Closed

Make Getters pure for BPs #229

ufna opened this issue Oct 19, 2019 · 2 comments
Labels
todo Internal development tasks

Comments

@ufna
Copy link
Owner

ufna commented Oct 19, 2019

No description provided.

@ufna ufna added the todo Internal development tasks label Oct 19, 2019
@freezernick
Copy link
Contributor

freezernick commented Oct 20, 2019

I could do this for you =)
I would use the DeprecatedFunction specifier to prevent breaking of the execution pins and a 'wrapper' for the CallableFunction to prevent naming conflicts like so:

// this
UFUNCTION(BlueprintCallable, ...)
FString GetUrl();

// to this
UFUNCTION(BlueprintCallable, ... DeprecatedFunction, DeprecationMessage="Please use pure getters intstead")
FString wGetUrl();

UFUNCTION(BlueprintPure, ...)
FString GetUrl();

.cpp:

FString wGetUrl()
{
  return GetUrl()
}

if that's ok for you

@ufna
Copy link
Owner Author

ufna commented Oct 20, 2019

Hi @freezernick ,

It sounds like a good idea! :)

@ufna ufna closed this as completed Dec 13, 2019
ufna added a commit that referenced this issue Dec 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
todo Internal development tasks
Projects
None yet
Development

No branches or pull requests

2 participants