MCPcopy Create free account
hub / github.com/amule-project/amule / DecodeFlags

Method DecodeFlags

src/utils/fileview/Print.cpp:292–312  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

290 }
291
292 wxString DecodeFlags(uint32_t flags)
293 {
294 uint32_t cur_flag = 1;
295 wxString result;
296 while (flags) {
297 if (flags & 1) {
298 if (!result.empty()) {
299 result += " | ";
300 }
301 FlagMap::const_iterator it = m_flags.find(cur_flag);
302 if (it != m_flags.end()) {
303 result += wxString::FromAscii(it->second);
304 } else {
305 result += wxString::Format("%#x", cur_flag);
306 }
307 }
308 cur_flag <<= 1;
309 flags >>= 1;
310 }
311 return result;
312 }
313
314 private:
315 FlagMap m_flags;

Callers 1

Print.cppFile · 0.80

Calls 2

emptyMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected