[Kstars-devel] KDE/kdeedu/kstars/kstars/skyobjects
Alexey Khudyakov
alexey.skladnoy at gmail.com
Thu Jun 11 14:34:08 CEST 2009
SVN commit 980198 by khudyakov:
Add copy constructor to KSMoon class. It really need one because
it use global objects and reference counting for allocation/deallocation them.
CCMAIL: kstars-devel at kde.org
M +6 -0 ksmoon.cpp
M +4 -4 ksmoon.h
--- trunk/KDE/kdeedu/kstars/kstars/skyobjects/ksmoon.cpp #980197:980198
@@ -37,6 +37,12 @@
setType( SkyObject::MOON );
}
+KSMoon::KSMoon(const KSMoon& o) :
+ KSPlanetBase(o)
+{
+ instance_count++;
+}
+
KSMoon* KSMoon::clone() const
{
return new KSMoon(*this);
--- trunk/KDE/kdeedu/kstars/kstars/skyobjects/ksmoon.h #980197:980198
@@ -35,11 +35,11 @@
class KSMoon : public KSPlanetBase {
public:
- /**
- *Default constructor. Set name="Moon".
- */
+ /** Default constructor. Set name="Moon". */
KSMoon();
-
+ /** Copy constructor */
+ KSMoon(const KSMoon& o);
+
virtual KSMoon* clone() const;
/**Destructor (empty). */
More information about the Kstars-devel
mailing list