Skip to content

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

Description

@personalmountains

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis has been identified as a bug

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions