Skip to content

Inline static variables (part 2) #106293

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

KoBeWi
Copy link
Member

@KoBeWi KoBeWi commented May 11, 2025

Follow-up to #105876

@KoBeWi KoBeWi added this to the 4.x milestone May 11, 2025
@KoBeWi KoBeWi requested review from a team as code owners May 11, 2025 22:11
Comment on lines +40 to +50
D3D12Hooks() {
if (singleton == nullptr) {
singleton = this;
}
}

virtual ~D3D12Hooks() {
if (singleton == this) {
singleton = nullptr;
}
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might be questionable, but these are very simple and were the only thing in the cpp file, so it could be removed...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think removing .cpp files is a goal, but having this in the .h file certainly isn't wrong either. I think it's fine :)

@KoBeWi KoBeWi force-pushed the transitory_interline branch from e849f5f to 8a3f585 Compare May 12, 2025 10:37
@KoBeWi KoBeWi force-pushed the transitory_interline branch from 8a3f585 to 955cafa Compare May 12, 2025 11:02
@KoBeWi
Copy link
Member Author

KoBeWi commented May 15, 2025

Why does this fail checks?

Error: ./core/os/thread.h:86:9: error: default member initializer for 'set_name' needed within definition of enclosing class 'Thread' outside of member functions

set_name is a method pointer, wtf.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants