From 428dbf77d16a1508e3cbca820b792c29288a6a1e Mon Sep 17 00:00:00 2001
From: Fons Rademakers <Fons.Rademakers@cern.ch>
Date: Thu, 20 Dec 2007 12:46:47 +0000
Subject: [PATCH] re-introduce old switch statement but disable it via an
 ifdef, so we can easily test if a new version of CINT fixes this problem.

git-svn-id: http://root.cern.ch/svn/root/trunk@21537 27541ba8-7e3a-0410-8455-c3a389f83636
---
 tutorials/gui/guitest.C | 27 ++++++++++++++++++++++++++-
 1 file changed, 26 insertions(+), 1 deletion(-)

diff --git a/tutorials/gui/guitest.C b/tutorials/gui/guitest.C
index 9d90056027f..2a2b6cadf30 100644
--- a/tutorials/gui/guitest.C
+++ b/tutorials/gui/guitest.C
@@ -1725,7 +1725,7 @@ void TestSliders::DoText(const char * /*text*/)
 void TestSliders::DoSlider(Int_t pos)
 {
    // Handle slider widgets.
-
+printf("handling slider\n");
    Int_t id;
    TGFrame *frm = (TGFrame *) gTQSender;
    if (frm->IsA()->InheritsFrom(TGSlider::Class())) {
@@ -1739,35 +1739,60 @@ void TestSliders::DoSlider(Int_t pos)
    char buf[32];
    sprintf(buf, "%d", pos);
 
+#ifdef CINT_FIXED
+   switch (id) {
+   case HSId1:
+#else
    if (id == HSId1) {
+#endif
       fTbh1->Clear();
       fTbh1->AddText(0, buf);
       // Re-align the cursor with the characters.
       fTeh1->SetCursorPosition(fTeh1->GetCursorPosition());
       fTeh1->Deselect();
       gClient->NeedRedraw(fTeh1);
+#ifdef CINT_FIXED
+      break;
+   case VSId1:
+#else
    }
    else if (id == VSId1) {
+#endif
       fTbv1->Clear();
       fTbv1->AddText(0, buf);
       fTev1->SetCursorPosition(fTev1->GetCursorPosition());
       fTev1->Deselect();
       gClient->NeedRedraw(fTev1);
+#ifdef CINT_FIXED
+      break;
+   case HSId2:
+#else
    }
    else if (id == HSId2) {
+#endif
       fTbh2->Clear();
       fTbh2->AddText(0, buf);
       fTeh2->SetCursorPosition(fTeh2->GetCursorPosition());
       fTeh2->Deselect();
       gClient->NeedRedraw(fTeh2);
+#ifdef CINT_FIXED
+      break;
+   case VSId2:
+#else
    }
    else if (id == VSId2) {
+#endif
       sprintf(buf, "%f", fVslider2->GetMinPosition());
       fTbv2->Clear();
       fTbv2->AddText(0, buf);
       fTev2->SetCursorPosition(fTev2->GetCursorPosition());
       fTev2->Deselect();
       gClient->NeedRedraw(fTev2);
+#ifdef CINT_FIXED
+      break;
+   default:
+      break;
+#endif
    }
 }
 
-- 
GitLab