[Kstars-devel] KDE/kdeedu/kstars/kstars/skyobjects
Alexey Khudyakov
alexey.skladnoy at gmail.com
Tue Jul 28 21:53:02 CEST 2009
SVN commit 1003779 by khudyakov:
Replace enum for kind for UID with static const UIDs
It's required since enum value shifted to left by 60
become zero.
CCMAIL: kstars-devel at kde.org
M +6 -0 skyobject.cpp
M +4 -6 skyobject.h
--- trunk/KDE/kdeedu/kstars/kstars/skyobjects/skyobject.cpp #1003778:1003779
@@ -41,6 +41,12 @@
QString SkyObject::unnamedObjectString = QString(i18n("unnamed object"));
QString SkyObject::starString = QString("star");
+const SkyObject::UID SkyObject::invalidUID;
+const SkyObject::UID SkyObject::UID_STAR;
+const SkyObject::UID SkyObject::UID_GALAXY;
+const SkyObject::UID SkyObject::UID_DEEPSKY;
+const SkyObject::UID SkyObject::UID_SOLARSYS;
+
SkyObject::SkyObject( int t, dms r, dms d, float m,
const QString &n, const QString &n2,
const QString &lname )
--- trunk/KDE/kdeedu/kstars/kstars/skyobjects/skyobject.h #1003778:1003779
@@ -53,12 +53,10 @@
typedef qint64 UID;
/** @short Kind of UID */
- enum UIDkind {
- UID_STAR = 0,
- UID_GALAXY = 1,
- UID_DEEPSKY = 2,
- UID_SOLARSYS = 3
- };
+ static const UID UID_STAR = 0;
+ static const UID UID_GALAXY = 1;
+ static const UID UID_DEEPSKY = 2;
+ static const UID UID_SOLARSYS = 3;
/** Invalid UID. Real sky object could not have such UID */
static const UID invalidUID = ~0;
More information about the Kstars-devel
mailing list