Skip to content
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

BitField::clear_flag() doesn't compile #1406

Closed
personalmountains opened this issue Mar 7, 2024 · 0 comments · Fixed by #1407
Closed

BitField::clear_flag() doesn't compile #1406

personalmountains opened this issue Mar 7, 2024 · 0 comments · Fixed by #1407
Labels
bug This has been identified as a bug
Milestone

Comments

@personalmountains
Copy link

Godot version

master

godot-cpp version

master

System information

Godot v4.3.dev.mono (652438a39) - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 2070 SUPER (NVIDIA; 31.0.15.5161) - AMD Ryzen 7 5800X3D 8-Core Processor (16 Threads)

Issue description

https://github.com/godotengine/godot-cpp/blob/master/include/godot_cpp/core/type_info.hpp#L258

template <class T>
class BitField {
	int64_t value = 0;

public:
	_FORCE_INLINE_ void set_flag(T p_flag) { value |= p_flag; }
	_FORCE_INLINE_ bool has_flag(T p_flag) const { return value & p_flag; }
	_FORCE_INLINE_ void clear_flag(T p_flag) { return value &= ~p_flag; }    // <---
	_FORCE_INLINE_ BitField(int64_t p_value) { value = p_value; }
	_FORCE_INLINE_ operator int64_t() const { return value; }
	_FORCE_INLINE_ operator Variant() const { return value; }
};

clear_flag() is void, but it has a return.

Steps to reproduce

NA

Minimal reproduction project

NA

@AThousandShips AThousandShips added the bug This has been identified as a bug label Mar 8, 2024
@AThousandShips AThousandShips added this to the 4.3 milestone Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This has been identified as a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants