Skip to content

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

Closed

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

Activity

  1. added
    bug
    on Mar 8, 2024
  2. added this to the 4.3 milestone on Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions