delcaration of static variables
You could declare static variables and assign them seperately.
By this I mean, you could write your code in the following way : -
void calculateData()
{
static double dDtScaleMin;
static double dDtScaleMax;
static long dtBoundMin;
static long dtBoundMax;
static double dtDiffScaleMinMax;
dDtScaleMin = m_TimeScaleAttr.GetDataScaleMin();
dDtScaleMax = m _TimeScaleAttr.GetDataScaleMax();
dtBoundMin = m_TimeScaleAttr.GetDataBoundMin();
dtBoundMax = m_TimeScaleAttr.GetDataBoundMax();
dtDiffScaleMinMax = dDtScaleMax-dDtScaleMin;
// other stuff
...
}