summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkarsh Simha <akarsh@kde.org>2016-10-10 09:22:44 (GMT)
committerAkarsh Simha <akarsh@kde.org>2016-10-10 09:33:15 (GMT)
commit682bf87410a62ed580c45d3f4f7326c9a0fcdfc0 (patch)
tree294c9e9f80e4578aeea5e5a14d306270d15eeb11
parent594d09ee75ec21a0e6dd741814e97b8e32506877 (diff)
Add missing overload for CachingDms::setD()
CCMAIL: mutlaqja@ikarustech.com
-rw-r--r--kstars/auxiliary/cachingdms.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/kstars/auxiliary/cachingdms.h b/kstars/auxiliary/cachingdms.h
index 67df6f0..f1df2d6 100644
--- a/kstars/auxiliary/cachingdms.h
+++ b/kstars/auxiliary/cachingdms.h
@@ -80,6 +80,18 @@ public:
}
/**
+ * @short Overrides dms::setD()
+ */
+ inline void setD( const int &d, const int &m, const int &s, const int &ms=0 ) { dms::setD( d, m, s, ms ); dms::SinCos( m_sin, m_cos );
+#ifdef COUNT_DMS_SINCOS_CALLS
+ cachingdms_delta -= 2;
+ if( !m_cacheUsed )
+ ++cachingdms_bad_uses;
+ m_cacheUsed = false;
+#endif
+ }
+
+ /**
* @short Sets the angle in hours, supplied as a double
* @note Re-implements dms::setH() with sine/cosine caching
* @note While this and other methods internally call setD, we want to avoid unnecessary vtable lookups. We'd rather have inline than virtual when speed matters in general.