diff options
author | joye <joye> | 2014-05-12 18:06:47 (GMT) |
---|---|---|
committer | joye <joye> | 2014-05-12 18:06:47 (GMT) |
commit | cd7ff8790e61f84cf24e558d7efbf7c956673fb0 (patch) | |
tree | 402340e829d4dc031d5d702b692b7093c3def606 | |
parent | 1721696040be998f3b2d05af9a00ef9c4b385c56 (diff) | |
download | blt-cd7ff8790e61f84cf24e558d7efbf7c956673fb0.zip blt-cd7ff8790e61f84cf24e558d7efbf7c956673fb0.tar.gz blt-cd7ff8790e61f84cf24e558d7efbf7c956673fb0.tar.bz2 |
*** empty log message ***
-rw-r--r-- | src/bltGrElemBar.C | 2 | ||||
-rw-r--r-- | src/bltGraphBar.C | 13 | ||||
-rw-r--r-- | src/bltGraphBar.h | 2 |
3 files changed, 5 insertions, 12 deletions
diff --git a/src/bltGrElemBar.C b/src/bltGrElemBar.C index 7c86a54..2a07aaa 100644 --- a/src/bltGrElemBar.C +++ b/src/bltGrElemBar.C @@ -296,7 +296,7 @@ void BarElement::map() (!gops->stackAxes)) { BarSetKey key; - key.value =float(x[ii]); + key.value =x[ii]; key.xAxis =ops->xAxis; key.yAxis =NULL; Tcl_HashEntry *hPtr = Tcl_FindHashEntry(&barGraphPtr_->setTable_, &key); diff --git a/src/bltGraphBar.C b/src/bltGraphBar.C index bb7a2f9..a05acee 100644 --- a/src/bltGraphBar.C +++ b/src/bltGraphBar.C @@ -211,12 +211,7 @@ BarGraph::BarGraph(ClientData clientData, Tcl_Interp* interp, barGroups_ =NULL; nBarGroups_ =0; maxBarSetSize_ =0; - int ss = (sizeof(float)+2*sizeof(Axis*))/sizeof(int); - cerr << sizeof(BarSetKey) << '/' << sizeof(int) << '=' - << sizeof(BarSetKey)/sizeof(int) << '#' - << (sizeof(float)+2*sizeof(Axis*)) << '/' << sizeof(int) << '=' - << ss << endl; - Tcl_InitHashTable(&setTable_, ss); + Tcl_InitHashTable(&setTable_, sizeof(BarSetKey)/sizeof(int)); ops->bottomMargin.site = MARGIN_BOTTOM; ops->leftMargin.site = MARGIN_LEFT; @@ -363,8 +358,7 @@ void BarGraph::initBarSets() // of the frequency of each x-coordinate and how many abscissas have // duplicate mappings. Tcl_HashTable setTable; - int ss = (sizeof(float)+2*sizeof(Axis*))/sizeof(int); - Tcl_InitHashTable(&setTable, ss); + Tcl_InitHashTable(&setTable, sizeof(BarSetKey)/sizeof(int)); int nSegs =0; for (Blt_ChainLink link = Blt_Chain_FirstLink(elements_.displayList); @@ -480,8 +474,7 @@ void BarGraph::destroyBarSets() } Tcl_DeleteHashTable(&setTable_); - int ss = (sizeof(float)+2*sizeof(Axis*))/sizeof(int); - Tcl_InitHashTable(&setTable_, ss); + Tcl_InitHashTable(&setTable_, sizeof(BarSetKey)/sizeof(int)); } void BarGraph::resetBarSets() diff --git a/src/bltGraphBar.h b/src/bltGraphBar.h index 0176c95..e766025 100644 --- a/src/bltGraphBar.h +++ b/src/bltGraphBar.h @@ -35,7 +35,7 @@ #include "bltGraph.h" typedef struct { - float value; + double value; Axis* xAxis; Axis* yAxis; } BarSetKey; |