Changeset View
Changeset View
Standalone View
Standalone View
plugins/platforms/x11/standalone/glxbackend.cpp
Show First 20 Lines • Show All 503 Lines • ▼ Show 20 Line(s) | 493 | { | |||
---|---|---|---|---|---|
504 | } | 504 | } | ||
505 | } | 505 | } | ||
506 | 506 | | |||
507 | int GlxBackend::visualDepth(xcb_visualid_t visual) const | 507 | int GlxBackend::visualDepth(xcb_visualid_t visual) const | ||
508 | { | 508 | { | ||
509 | return m_visualDepthHash.value(visual); | 509 | return m_visualDepthHash.value(visual); | ||
510 | } | 510 | } | ||
511 | 511 | | |||
512 | static inline int bitCount(uint32_t mask) | 512 | static inline constexpr int bitCount(uint32_t mask) | ||
513 | { | 513 | { | ||
514 | #if defined(__GNUC__) | 514 | #if defined(__GNUC__) | ||
515 | return __builtin_popcount(mask); | 515 | return __builtin_popcount(mask); | ||
516 | #else | 516 | #else | ||
517 | int count = 0; | 517 | int count = 0; | ||
518 | 518 | | |||
519 | while (mask) { | 519 | while (mask) { | ||
520 | count += (mask & 1); | 520 | count += (mask & 1); | ||
▲ Show 20 Lines • Show All 439 Lines • Show Last 20 Lines |