MCPcopy Create free account
hub / github.com/GDRETools/gdsdecomp / get_mask_width

Function get_mask_width

compat/ico_loader.cpp:103–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101};
102
103static uint8_t get_mask_width(uint16_t mask) {
104 // Returns number of ones in the binary value of the parameter: mask.
105 // Uses a Simple pop_count.
106 uint8_t c = 0u;
107 for (; mask != 0u; mask &= mask - 1u) {
108 c++;
109 }
110 return c;
111}
112
113static Error parse_after_file_header(const Vector<uint8_t> &p_data, bmp_header_s &bmp_header) {
114 Ref<FileAccessMemory> f = memnew(FileAccessMemory);

Callers 1

parse_after_file_headerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected