Remove useless uses of const for return types

An integer or float value can not be assigned to, so there is no point
in qualifying it as const.
This commit is contained in:
Neven Sajko
2020-02-28 00:35:15 +00:00
committed by EmilieNumworks
parent d727fb4cf8
commit aae5e49c01
5 changed files with 8 additions and 8 deletions

View File

@@ -106,11 +106,11 @@ void CurveView::setOkView(View * okView) {
* m_frame.height() - 1 yMin()
*/
const float CurveView::pixelWidth() const {
float CurveView::pixelWidth() const {
return (m_curveViewRange->xMax() - m_curveViewRange->xMin()) / (m_frame.width() - 1);
}
const float CurveView::pixelHeight() const {
float CurveView::pixelHeight() const {
return (m_curveViewRange->yMax() - m_curveViewRange->yMin()) / (m_frame.height() - 1);
}

View File

@@ -38,8 +38,8 @@ public:
void setBannerView(View * bannerView);
void setOkView(View * okView);
void setForceOkDisplay(bool force) { m_forceOkDisplay = force; }
const float pixelWidth() const;
const float pixelHeight() const;
float pixelWidth() const;
float pixelHeight() const;
protected:
CurveViewRange * curveViewRange() const { return m_curveViewRange; }
void setCurveViewRange(CurveViewRange * curveViewRange);

View File

@@ -17,8 +17,8 @@ public:
virtual float xMax() const = 0;
virtual float yMin() const = 0;
virtual float yMax() const = 0;
const float xCenter() const { return (xMin() + xMax()) / 2; }
const float yCenter() const { return (yMin() + yMax()) / 2; }
float xCenter() const { return (xMin() + xMax()) / 2; }
float yCenter() const { return (yMin() + yMax()) / 2; }
virtual float xGridUnit() const {
return computeGridUnit(k_minNumberOfXGridUnits, k_maxNumberOfXGridUnits, xMax() - xMin());
}

View File

@@ -274,7 +274,7 @@ public:
m_numberOfChildren(numberOfChildren),
m_untypedBuilder(builder) {}
const char * name() const { return m_name; }
const int numberOfChildren() const { return m_numberOfChildren; }
int numberOfChildren() const { return m_numberOfChildren; }
Expression build(Expression children) const { return (*m_untypedBuilder)(children); }
private:
const char * m_name;

View File

@@ -29,7 +29,7 @@ public:
m_exponent(exponent)
{}
const char * symbol() const { return m_symbol; }
const int8_t exponent() const { return m_exponent; }
int8_t exponent() const { return m_exponent; }
int serialize(char * buffer, int bufferSize) const;
private:
const char * m_symbol;