Skip to content

Commit d1a27d9

Browse files
committed
GPU Display: Cleanup: add some typedefs and rename variables
1 parent f393670 commit d1a27d9

14 files changed

Lines changed: 133 additions & 129 deletions

‎GPU/GPUTracking/display/GPUDisplay.cxx‎

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ void GPUDisplay::ResizeScene(int32_t width, int32_t height, bool init)
147147
mBackend->resizeScene(width, height);
148148

149149
if (init) {
150-
mCfgC.mResetScene.store(true);
150+
mCfgC.resetScene.store(true);
151151
*mViewMatrix = MY_HMM_IDENTITY;
152152
*mModelMatrix = MY_HMM_IDENTITY;
153153
}
@@ -259,8 +259,8 @@ void GPUDisplay::DrawGLScene_cameraAndAnimation(bool suspended, float animateTim
259259
mFrontend->mMouseWheel = 0;
260260
bool lookOrigin = mCfgR.camLookOrigin ^ mFrontend->mKeys[mFrontend->mKeyDownMap[mFrontend->KEY_MAP_FOCUS_ORIGIN]];
261261
bool yUp = mCfgR.camYUp ^ mFrontend->mKeys[mFrontend->mKeyDownMap[mFrontend->KEY_MAP_FOCUS_ORIENT_UP]] ^ lookOrigin;
262-
bool rotateModelTPC = mCfgC.mRotateAroundZ || mFrontend->mKeys[mFrontend->mKeyDownMap[mFrontend->KEY_MAP_ROTATE_AROUND_Z]];
263-
bool rotateModel = rotateModelTPC || mCfgC.mRotateModel || mFrontend->mKeys[mFrontend->mKeyDownMap[mFrontend->KEY_MAP_ROTATE_MODEL]];
262+
bool rotateModelTPC = mCfgC.rotateAroundZ || mFrontend->mKeys[mFrontend->mKeyDownMap[mFrontend->KEY_MAP_ROTATE_AROUND_Z]];
263+
bool rotateModel = rotateModelTPC || mCfgC.rotateModel || mFrontend->mKeys[mFrontend->mKeyDownMap[mFrontend->KEY_MAP_ROTATE_MODEL]];
264264

265265
// Calculate rotation / translation scaling factors
266266
float scalefactor = mFrontend->mKeys[mFrontend->KEY_SHIFT] ? 0.2f : 1.0f;
@@ -282,7 +282,7 @@ void GPUDisplay::DrawGLScene_cameraAndAnimation(bool suspended, float animateTim
282282

283283
if (animateCamera(suspended, animateTime, mixSlaveImage, nextViewMatrix)) {
284284
// Do nothing else
285-
} else if (mCfgC.mResetScene.load()) {
285+
} else if (mCfgC.resetScene.load()) {
286286
const float initialZpos = mCfgH.projectXY ? 16 : (mParam->par.continuousTracking ? (mMaxClusterZ * GL_SCALE_FACTOR + 8) : 8);
287287
nextViewMatrix = nextViewMatrix * HMM_Translate({{0, 0, -initialZpos}});
288288
*mViewMatrix = MY_HMM_IDENTITY;
@@ -298,7 +298,7 @@ void GPUDisplay::DrawGLScene_cameraAndAnimation(bool suspended, float animateTim
298298
mCfgR.fov = 45.f;
299299
mUpdateDrawCommands = true;
300300

301-
mCfgC.mResetScene.store(false);
301+
mCfgC.resetScene.store(false);
302302
} else {
303303
float moveZ = scalefactor * ((float)mMouseWheelTmp / 150 + (float)(mFrontend->mKeys[mFrontend->mKeyDownMap[mFrontend->KEY_MAP_FORWARD]] - mFrontend->mKeys[mFrontend->mKeyDownMap[mFrontend->KEY_MAP_BACKWARD]]) * (!mFrontend->mKeys[mFrontend->KEY_SHIFT]) * 0.2f * mFPSScale);
304304
float moveY = scalefactor * ((float)(mFrontend->mKeys[mFrontend->mKeyDownMap[mFrontend->KEY_MAP_STRAFE_DOWN]] - mFrontend->mKeys[mFrontend->mKeyDownMap[mFrontend->KEY_MAP_STRAFE_UP]]) * (!mFrontend->mKeys[mFrontend->KEY_SHIFT]) * 0.2f * mFPSScale);
@@ -320,15 +320,15 @@ void GPUDisplay::DrawGLScene_cameraAndAnimation(bool suspended, float animateTim
320320
}
321321

322322
if (mFrontend->mKeys[mFrontend->mKeyDownMap[mFrontend->KEY_MAP_CHANGE_ANIMATION_INTERVAL]]) {
323-
mCfgC.mAnimationDelay += moveX;
324-
if (mCfgC.mAnimationDelay < 0.05f) {
325-
mCfgC.mAnimationDelay = 0.05f;
326-
} else if (mCfgC.mAnimationDelay > 20.f) {
327-
mCfgC.mAnimationDelay = 20.f;
323+
mCfgC.animationDelay += moveX;
324+
if (mCfgC.animationDelay < 0.05f) {
325+
mCfgC.animationDelay = 0.05f;
326+
} else if (mCfgC.animationDelay > 20.f) {
327+
mCfgC.animationDelay = 20.f;
328328
}
329329
moveX = 0.f;
330330
moveY = 0.f;
331-
SetInfo("Animation delay set to %1.2f", mCfgC.mAnimationDelay);
331+
SetInfo("Animation delay set to %1.2f", mCfgC.animationDelay);
332332
}
333333

334334
if (yUp) {
@@ -637,28 +637,28 @@ void GPUDisplay::DrawGLScene_drawCommands()
637637

638638
void GPUDisplay::DrawGLScene_internal(bool suspended, float animateTime, bool renderToMixBuffer) // negative time = no mixing
639639
{
640-
if (mCfgC.mRequestScreenshot || mCfgC.mAnimateScreenshot) {
640+
if (mCfgC.requestScreenshot || mCfgC.animateScreenshot) {
641641
const uint32_t factor = std::max(1, mCfgR.drawQualityDownsampleFSAA) * std::max(1, mCfgR.screenshotScaleFactor);
642642
if (std::max(mBackend->mScreenWidth, mBackend->mScreenHeight) * factor > mBackend->mMaxRenderSize) {
643643
GPUError("Screenshot not taken: requested render size %u x %u (window x FSAA x screenshot scale) exceeds the maximum size %u x %u", mBackend->mScreenWidth * factor, mBackend->mScreenHeight * factor, mBackend->mMaxRenderSize, mBackend->mMaxRenderSize);
644-
mCfgC.mRequestScreenshot = false;
645-
mCfgC.mAnimateScreenshot = 0;
644+
mCfgC.requestScreenshot = false;
645+
mCfgC.animateScreenshot = 0;
646646
}
647647
}
648-
const bool animateScreenshot = mCfgC.mAnimateScreenshot && mAnimate; // Copy, the animation resets mAnimateScreenshot in its last frame
649-
const bool screenshotFrame = mCfgC.mRequestScreenshot || animateScreenshot; // Also for the mix pass (animateTime >= 0), which must use the same render size
648+
const bool animateScreenshot = mCfgC.animateScreenshot && mAnimate; // Copy, the animation resets animateScreenshot in its last frame
649+
const bool screenshotFrame = mCfgC.requestScreenshot || animateScreenshot; // Also for the mix pass (animateTime >= 0), which must use the same render size
650650
const bool doScreenshot = screenshotFrame && animateTime < 0;
651651

652652
updateOptions();
653-
if (animateTime < 0 && (mUpdateEventData || mCfgC.mResetScene.load() || mUpdateVertexLists) && mIOPtrs) {
653+
if (animateTime < 0 && (mUpdateEventData || mCfgC.resetScene.load() || mUpdateVertexLists) && mIOPtrs) {
654654
disableUnsupportedOptions();
655655
}
656656
if (mUpdateEventData || mUpdateVertexLists) {
657657
mUpdateDrawCommands = true;
658658
}
659659

660660
HighResTimer timerDraw(mUpdateVertexLists);
661-
if (animateTime < 0 && (mUpdateEventData || mCfgC.mResetScene.load()) && mIOPtrs) {
661+
if (animateTime < 0 && (mUpdateEventData || mCfgC.resetScene.load()) && mIOPtrs) {
662662
timerDraw.ResetStart();
663663
DrawGLScene_updateEventData();
664664
mTimerFPS.ResetStart();
@@ -720,7 +720,7 @@ void GPUDisplay::DrawGLScene_internal(bool suspended, float animateTime, bool re
720720
fps, mCfgL.drawSector, mCfgL.drawClusters, mCfgL.drawInitLinks, mCfgL.drawLinks, mCfgL.drawSeeds, mCfgL.drawTracklets, mCfgL.drawTracks, mCfgL.drawExtrapolatedTracks, mCfgL.drawFinal, mFramesDone, mNDrawCalls, mXYZ[0], mXYZ[1], mXYZ[2], mRPhiTheta[0], mRPhiTheta[1] * 180 / CAMath::Pi(),
721721
mRPhiTheta[2] * 180 / CAMath::Pi(), mAngle[1] * 180 / CAMath::Pi(), mAngle[0] * 180 / CAMath::Pi(), mAngle[2] * 180 / CAMath::Pi(), mBackend->mScreenWidth, mBackend->mScreenHeight);
722722
if (fpstime > 1.) {
723-
if (mCfgC.mPrintInfoText & 2) {
723+
if (mCfgC.printInfoText & 2) {
724724
GPUInfo("%s", info);
725725
}
726726
if (mFPSScaleadjust++) {
@@ -731,12 +731,12 @@ void GPUDisplay::DrawGLScene_internal(bool suspended, float animateTime, bool re
731731
}
732732

733733
const float consoleFraction = consoleVerticalFraction();
734-
const bool drawText = (mCfgC.mPrintInfoText & 1) || consoleFraction > 0.f;
734+
const bool drawText = (mCfgC.printInfoText & 1) || consoleFraction > 0.f;
735735
if (drawText) {
736736
mBackend->updateFontScale(mFrontend->getDisplayScale());
737737
mBackend->prepareText();
738738
}
739-
if (mCfgC.mPrintInfoText & 1 || mCfgC.mPrintInfoTextGUI) {
739+
if (mCfgC.printInfoText & 1 || mCfgC.printInfoTextGUI) {
740740
showInfo(info);
741741
}
742742
if (consoleFraction > 0.f) {
@@ -752,13 +752,13 @@ void GPUDisplay::DrawGLScene_internal(bool suspended, float animateTime, bool re
752752

753753
mBackend->finishFrame(doScreenshot, renderToMixBuffer, mixSlaveImage);
754754
if (doScreenshot) {
755-
mCfgC.mRequestScreenshot = false;
755+
mCfgC.requestScreenshot = false;
756756
std::vector<char> pixels = mBackend->getPixels();
757757
char tmpFileName[48];
758758
if (animateScreenshot) {
759759
snprintf(tmpFileName, 48, "%d_%05d.bmp", mAnimationExport, mAnimationFrame);
760760
}
761-
DoScreenshot(animateScreenshot ? (mCfgC.mScreenShotname + tmpFileName).c_str() : mScreenshotFile.c_str(), pixels);
761+
DoScreenshot(animateScreenshot ? (mCfgC.mscreenShotName + tmpFileName).c_str() : mScreenshotFile.c_str(), pixels);
762762
}
763763
}
764764

@@ -768,7 +768,7 @@ void GPUDisplay::ShowNextEvent(const GPUTrackingInOutPointers* ptrs)
768768
mIOPtrs = ptrs;
769769
}
770770
if (mMaxClusterZ <= 0) {
771-
mCfgC.mResetScene.store(true);
771+
mCfgC.resetScene.store(true);
772772
}
773773
mUpdateEventData = true;
774774
mLoadAndShowEvent = true;

‎GPU/GPUTracking/display/GPUDisplay.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,9 +187,9 @@ class GPUDisplay : public GPUDisplayInterface
187187
void calcXYZ(const float*);
188188
void mAnimationCloseAngle(float& newangle, float lastAngle);
189189
void mAnimateCloseQuaternion(float* v, float lastx, float lasty, float lastz, float lastw);
190-
void SaveGLPos(); // Camera position to mCfgC.mGLPosFile
190+
void SaveGLPos(); // Camera position to mCfgC.glPosFile
191191
void LoadGLPos();
192-
void SaveGLAnimation(); // Animation path to mCfgC.mGLAnimationFile
192+
void SaveGLAnimation(); // Animation path to mCfgC.glAnimationFile
193193
void LoadGLAnimation();
194194
void takeScreenshot();
195195
void runAnimation(); // Starts the animation if it has enough points

‎GPU/GPUTracking/display/GPUDisplayControl.h‎

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -22,24 +22,24 @@
2222
// clang-format off
2323
BeginNamespace(o2::gpu)
2424
BeginHiddenConfig(GPUDisplayControl, control)
25-
AddVariable(mDisplayControl, GPUDisplayCopyableAtomic<int32_t>, 0) // Control for next event (=1) or quit (=2)
26-
AddVariable(mResetScene, GPUDisplayCopyableAtomic<bool>, false)
27-
AddVariable(mPrintInfoText, int32_t, 1)
28-
AddVariable(mPrintInfoTextAlways, bool, false)
29-
AddVariable(mRequestScreenshot, bool, false)
30-
AddVariable(mAnimateScreenshot, int32_t, 0)
31-
AddVariable(mAnimationChangeConfig, bool, true)
32-
AddVariable(mAnimationDelay, float, 2.f)
33-
AddVariable(mPrintInfoTextGUI, bool, true) // Send the status and info text to the Qt GUI, shown at its bottom
34-
AddVariable(mGuiPrintInfo, bool, false) // Show the info of options changed with Qt GUI elements (not for key presses in the GUI)
35-
AddVariable(mRotateModel, bool, false) // Rotate the model instead of the camera, like holding RCTRL (set in the Qt GUI)
36-
AddVariable(mRotateAroundZ, bool, false) // Rotate the TPC around the beamline, like holding RALT (set in the Qt GUI)
37-
AddVariable(mFilterMacroCustom, std::string, "") // Code of the custom track filter ROOT macro (trackFilter = filterMacros.size() + 1), set in the Qt GUI
38-
AddVariable(mScreenShotname, std::string, "screenshot") // Name of screenshot and animation frame files, followed by numbers
39-
AddVariable(mGLPosFile, std::string, "glpos.tmp") // File for saving / loading the camera position
40-
AddVariable(mGLAnimationFile, std::string, "glanimation.tmp") // File for saving / loading the animation path
41-
AddVariable(mGuiDarkMode, int8_t, -1) // Dark mode of the Qt GUI, -1 = not yet set: the GUI reports the system scheme when it starts
42-
AddVariable(mGuiScale, float, 1.f) // Scale factor of text and elements of the Qt GUI (on top of the system scaling), Ctrl + mouse wheel / Ctrl + 0 in the GUI
25+
AddVariable(displayControl, GPUDisplayCopyableAtomic<int32_t>, 0) // Control for next event (=1) or quit (=2)
26+
AddVariable(resetScene, GPUDisplayCopyableAtomic<bool>, false)
27+
AddVariable(printInfoText, int32_t, 1)
28+
AddVariable(printInfoTextAlways, bool, false)
29+
AddVariable(requestScreenshot, bool, false)
30+
AddVariable(animateScreenshot, int32_t, 0)
31+
AddVariable(animationChangeConfig, bool, true)
32+
AddVariable(animationDelay, float, 2.f)
33+
AddVariable(printInfoTextGUI, bool, true) // Send the status and info text to the Qt GUI, shown at its bottom
34+
AddVariable(guiPrintInfo, bool, false) // Show the info of options changed with Qt GUI elements (not for key presses in the GUI)
35+
AddVariable(rotateModel, bool, false) // Rotate the model instead of the camera, like holding RCTRL (set in the Qt GUI)
36+
AddVariable(rotateAroundZ, bool, false) // Rotate the TPC around the beamline, like holding RALT (set in the Qt GUI)
37+
AddVariable(filterMacroCustom, std::string, "") // Code of the custom track filter ROOT macro (trackFilter = filterMacros.size() + 1), set in the Qt GUI
38+
AddVariable(mscreenShotName, std::string, "screenshot") // Name of screenshot and animation frame files, followed by numbers
39+
AddVariable(glPosFile, std::string, "glpos.tmp") // File for saving / loading the camera position
40+
AddVariable(glAnimationFile, std::string, "glanimation.tmp") // File for saving / loading the animation path
41+
AddVariable(guiDarkMode, int8_t, -1) // Dark mode of the Qt GUI, -1 = not yet set: the GUI reports the system scheme when it starts
42+
AddVariable(guiScale, float, 1.f) // Scale factor of text and elements of the Qt GUI (on top of the system scaling), Ctrl + mouse wheel / Ctrl + 0 in the GUI
4343
AddVariable(showConsole, bool, false) // Console shown (^ key): all other keys go to the console
4444
AddVariable(dummy, bool, false) // dummy value to reference for keys that do not change variables
4545
EndConfig()

‎GPU/GPUTracking/display/frontend/GPUDisplayFrontend.cxx‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,10 @@ void GPUDisplayFrontend::HandleExternalGUISignals()
135135
}
136136
applyGUIValues(*update);
137137
if (update->guiScale) {
138-
mDisplay->mCfgC.mGuiScale = *update->guiScale;
138+
mDisplay->mCfgC.guiScale = *update->guiScale;
139139
}
140140
if (update->guiDarkMode) {
141-
mDisplay->mCfgC.mGuiDarkMode = *update->guiDarkMode;
141+
mDisplay->mCfgC.guiDarkMode = *update->guiDarkMode;
142142
}
143143
}
144144

@@ -147,8 +147,8 @@ void GPUDisplayFrontend::HandleExternalGUISignals()
147147
{
148148
std::lock_guard lock(mGUIChannel->mutex);
149149
mGUIChannel->state.cfg = std::move(cfg);
150-
mGUIChannel->state.infoStatus = mDisplay->mCfgC.mPrintInfoTextGUI ? mDisplay->mGUIInfoStatus : "";
151-
mGUIChannel->state.infoText = mDisplay->mCfgC.mPrintInfoTextGUI ? mDisplay->mGUIInfoText : "";
150+
mGUIChannel->state.infoStatus = mDisplay->mCfgC.printInfoTextGUI ? mDisplay->mGUIInfoStatus : "";
151+
mGUIChannel->state.infoText = mDisplay->mCfgC.printInfoTextGUI ? mDisplay->mGUIInfoText : "";
152152
mGUIChannel->state.infoTextCounter = mDisplay->mGUIInfoTextCounter;
153153
if (mDisplay->mUpdateGUIOptions) {
154154
mGUIChannel->state.optionsRevision++;
@@ -184,8 +184,8 @@ void GPUDisplayFrontend::sendExternalGUIKey(int32_t v, uint32_t translationMode,
184184

185185
bool GPUDisplayFrontend::consoleShown() const { return mDisplay->mCfgC.showConsole; }
186186

187-
int32_t GPUDisplayFrontend::getDisplayControl() const { return mDisplay->mCfgC.mDisplayControl.load(); }
188-
void GPUDisplayFrontend::setDisplayControl(int32_t v) { mDisplay->mCfgC.mDisplayControl.store(v); }
187+
int32_t GPUDisplayFrontend::getDisplayControl() const { return mDisplay->mCfgC.displayControl.load(); }
188+
void GPUDisplayFrontend::setDisplayControl(int32_t v) { mDisplay->mCfgC.displayControl.store(v); }
189189

190190
void GPUDisplayFrontend::HandleKey(uint8_t key) { mDisplay->HandleKey(key); }
191191
int32_t GPUDisplayFrontend::HandleUpdatesAndDrawGLScene(bool suspended)
@@ -376,7 +376,7 @@ void GPUDisplayFrontend::StopDisplay()
376376
{
377377
std::unique_lock lock(mExitStateMutex);
378378
if (mDisplayRunning) {
379-
mDisplay->mCfgC.mDisplayControl.store(2);
379+
mDisplay->mCfgC.displayControl.store(2);
380380
StopDisplayA();
381381
mDisplay->UnblockDisplay();
382382
}

‎GPU/GPUTracking/display/frontend/GPUDisplayFrontendConfig.cxx‎

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ struct GPUDisplayFrontend::GPUDisplayConfiguration {
6868
static constexpr uint32_t INVALID_INDEX = std::numeric_limits<uint32_t>::max();
6969
static constexpr uint32_t KEY_MAP_INDEX = 0x80000000; // configRTTIIndex of keys mapped to mKeyDownMap[configRTTIIndex - KEY_MAP_INDEX]
7070
static bool isKeyMap(uint32_t index) { return index >= KEY_MAP_INDEX && index != INVALID_INDEX; }
71+
using keyDownMapEntry = std::tuple<uint8_t, uint8_t>; // KEY_DOWN_MAP: key, KEY_MAP_ id
72+
using keyLambdaEntry = std::tuple<uint16_t, uint32_t, configKeyCallback>; // KEY_LAMBDA: key, index in rttiEntries, callback
7173
std::vector<std::string> configStructNames;
7274
std::array<configKey, N_TOTAL_KEYS> configKeys; // By key code, special keys with SHIFT at code + SPECIAL_KEYS_SHIFTED
7375
std::vector<std::string> keyNames;
@@ -171,7 +173,7 @@ void GPUDisplay::checkAndApplyConfigChanges()
171173
if (oldCfgH.trackFilter != mCfgH.trackFilter) {
172174
mUpdateTrackFilter = true;
173175
}
174-
mCfgC.mRotateModel |= mCfgC.mRotateAroundZ;
176+
mCfgC.rotateModel |= mCfgC.rotateAroundZ;
175177
if (mCfgC.showConsole != mConsoleShown) {
176178
mConsoleShown = mCfgC.showConsole;
177179
const double start = mConsoleTimer.IsRunning() ? std::max(0., mConfig.internal.consoleDelay - mConsoleTimer.GetCurrentElapsedTime()) : 0.; // Reverse a running animation from its current position
@@ -216,7 +218,7 @@ void GPUDisplayFrontend::HandleExternalGUIKeys()
216218
template <typename... Args>
217219
void GPUDisplayFrontend::add_key_binding(Args&&... args)
218220
{
219-
constexpr size_t nKeys = (0 + ... + (std::is_same_v<std::remove_cvref_t<Args>, std::tuple<uint16_t, uint32_t, configKeyCallback>> || std::is_same_v<std::remove_cvref_t<Args>, std::tuple<uint8_t, uint8_t>>));
221+
constexpr size_t nKeys = (0 + ... + (std::is_same_v<std::remove_cvref_t<Args>, GPUDisplayConfiguration::keyLambdaEntry> || std::is_same_v<std::remove_cvref_t<Args>, GPUDisplayConfiguration::keyDownMapEntry>));
220222
static_assert(nKeys >= 1 && (sizeof...(Args) == nKeys + 1 || sizeof...(Args) == nKeys + 2), "add_key_binding needs at least one key, the help text, and optionally the keys to show in the help text");
221223
auto argTuple = std::forward_as_tuple(args...);
222224
std::string keys;
@@ -227,16 +229,18 @@ void GPUDisplayFrontend::add_key_binding(Args&&... args)
227229
if (entry.callback || entry.configRTTIIndex != GPUDisplayConfiguration::INVALID_INDEX) {
228230
throw std::runtime_error("Key [" + name + "] assigned twice in display frontend");
229231
}
230-
if constexpr (std::is_same_v<std::remove_cvref_t<decltype(key)>, std::tuple<uint8_t, uint8_t>>) {
232+
if constexpr (std::is_same_v<std::remove_cvref_t<decltype(key)>, GPUDisplayConfiguration::keyDownMapEntry>) {
231233
const uint8_t id = std::get<1>(key);
232234
if (mKeyDownMap[id]) {
233235
throw std::runtime_error("Key down mapping " + mConfigRTTI->keyMapNames[id] + " assigned twice in display frontend");
234236
}
235237
mKeyDownMap[id] = character >= 'a' && character <= 'z' ? character + 'A' - 'a' : character; // mKeys stores letters in upper case
236238
entry.configRTTIIndex = GPUDisplayConfiguration::KEY_MAP_INDEX + id;
237-
} else {
239+
} else if constexpr (std::is_same_v<std::remove_cvref_t<decltype(key)>, GPUDisplayConfiguration::keyLambdaEntry>) {
238240
entry.configRTTIIndex = std::get<1>(key);
239241
entry.callback = std::move(std::get<2>(key));
242+
} else {
243+
static_assert(false, "invalid code path");
240244
}
241245
keys += (keys.empty() ? "[" : " [") + name + "]";
242246
};
@@ -416,7 +420,7 @@ void GPUDisplayFrontend::applyGUIValues(const GPUDisplayGUIUpdate& update)
416420
GPUError("Invalid value from the GUI for element %u: %s", id, ex.what());
417421
continue;
418422
}
419-
if (mDisplay->mCfgC.mGuiPrintInfo && e.rttiIndex < mConfigRTTI->configInfos.size()) {
423+
if (mDisplay->mCfgC.guiPrintInfo && e.rttiIndex < mConfigRTTI->configInfos.size()) {
420424
showConfigInfo(e.rttiIndex);
421425
}
422426
}

0 commit comments

Comments
 (0)