4f46a97599aeb8374d4ff2b41a41edae1ce76ca5
tdreszer
  Mon Jul 25 15:28:04 2011 -0700
Replaced tdfbExtras hash with struct for efficiency. Redmine 4674.
diff --git src/hg/lib/cart.c src/hg/lib/cart.c
index d875ee8..66bbd7e 100644
--- src/hg/lib/cart.c
+++ src/hg/lib/cart.c
@@ -2275,47 +2275,46 @@
     if (count > 0)
         {
         // At least on view was shaped, so all views will get explicit vis.  This means composite must be set to full
         enum trackVisibility visOrig = tdbVisLimitedByAncestry(cart, tdbContainer, FALSE);
         cartSetString(cart,tdbContainer->track,"full");    // Now set composite to full.
         if (visOrig == tvHide && tdbIsSuperTrackChild(tdbContainer))
             cartTdbOverrideSuperTracks(cart,tdbContainer,FALSE);      // deal with superTrack vis! cleanup
         }
     }
 else // If no views then composite is not set to fuul but to max of subtracks
     count = cartTdbParentShapeVis(cart,tdbContainer,NULL,subVisHash,reshapeFully);
 
 hashFree(&subVisHash);
 
 // If reshaped, be sure to set flag to stop composite cleanup
-#define RESHAPED_COMPOSITE "reshaped"
 if (count > 0)
-    tdbExtrasAddOrUpdate(tdbContainer,RESHAPED_COMPOSITE,(void *)(long)TRUE); // Exists for the life of the cgi only
+    tdbExtrasReshapedCompositeSet(tdbContainer);
 
 return TRUE;
 }
 
 boolean cartTdbTreeCleanupOverrides(struct trackDb *tdb,struct cart *newCart,struct hash *oldVars, struct lm *lm)
 /* When container or composite/view settings changes, remove subtrack specific settings
    Returns TRUE if any cart vars are removed */
 {
 boolean anythingChanged = cartTdbOverrideSuperTracks(newCart,tdb,TRUE);
 if (!tdbIsContainer(tdb))
     return anythingChanged;
 
 // If composite has been reshaped then don't clean it up
-if ((boolean)(long)tdbExtrasGetOrDefault(tdb,RESHAPED_COMPOSITE,(void *)(long)FALSE))
+if (tdbExtrasReshapedComposite(tdb))
     return anythingChanged;
 
 // vis is a special additive case! composite or view level changes then remove subtrack vis
 boolean containerVisChanged = cartValueHasChanged(newCart,oldVars,tdb->track,TRUE,FALSE);
 if (containerVisChanged)
     {
     // If just created and if vis is the same as tdb default then vis has not changed
     char *cartVis = cartOptionalString(newCart,tdb->track);
     char *oldValue = hashFindVal(oldVars,tdb->track);
     if (cartVis && oldValue == NULL && hTvFromString(cartVis) == tdb->visibility)
         containerVisChanged = FALSE;
     }
 struct trackDb *tdbView = NULL;
 struct slPair *oneName = NULL;
 char *suffix = NULL;