Avoid signed/unsigned compiler warning.
We don't really need a signed int here.
This commit is contained in:
parent
81ef922f02
commit
42d8772dd6
@ -150,7 +150,7 @@ public:
|
|||||||
SGSubsystemGroup::SGSubsystemGroup () :
|
SGSubsystemGroup::SGSubsystemGroup () :
|
||||||
_fixedUpdateTime(-1.0),
|
_fixedUpdateTime(-1.0),
|
||||||
_updateTimeRemainder(0.0),
|
_updateTimeRemainder(0.0),
|
||||||
_initPosition(-1)
|
_initPosition(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -173,9 +173,6 @@ SGSubsystemGroup::init ()
|
|||||||
SGSubsystem::InitStatus
|
SGSubsystem::InitStatus
|
||||||
SGSubsystemGroup::incrementalInit()
|
SGSubsystemGroup::incrementalInit()
|
||||||
{
|
{
|
||||||
if (_initPosition < 0)
|
|
||||||
_initPosition = 0;
|
|
||||||
|
|
||||||
if (_initPosition >= _members.size())
|
if (_initPosition >= _members.size())
|
||||||
return INIT_DONE;
|
return INIT_DONE;
|
||||||
|
|
||||||
@ -210,7 +207,7 @@ SGSubsystemGroup::shutdown ()
|
|||||||
// reverse order to prevent order dependency problems
|
// reverse order to prevent order dependency problems
|
||||||
for (unsigned int i = _members.size(); i > 0; i--)
|
for (unsigned int i = _members.size(); i > 0; i--)
|
||||||
_members[i-1]->subsystem->shutdown();
|
_members[i-1]->subsystem->shutdown();
|
||||||
_initPosition = -1;
|
_initPosition = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -412,7 +409,7 @@ SGSubsystemGroup::Member::update (double delta_time_sec)
|
|||||||
|
|
||||||
|
|
||||||
SGSubsystemMgr::SGSubsystemMgr () :
|
SGSubsystemMgr::SGSubsystemMgr () :
|
||||||
_initPosition(-1)
|
_initPosition(0)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < MAX_GROUPS; i++) {
|
for (int i = 0; i < MAX_GROUPS; i++) {
|
||||||
_groups[i] = new SGSubsystemGroup;
|
_groups[i] = new SGSubsystemGroup;
|
||||||
@ -440,9 +437,6 @@ SGSubsystemMgr::init ()
|
|||||||
SGSubsystem::InitStatus
|
SGSubsystem::InitStatus
|
||||||
SGSubsystemMgr::incrementalInit()
|
SGSubsystemMgr::incrementalInit()
|
||||||
{
|
{
|
||||||
if (_initPosition < 0)
|
|
||||||
_initPosition = 0;
|
|
||||||
|
|
||||||
if (_initPosition >= MAX_GROUPS)
|
if (_initPosition >= MAX_GROUPS)
|
||||||
return INIT_DONE;
|
return INIT_DONE;
|
||||||
|
|
||||||
@ -474,7 +468,7 @@ SGSubsystemMgr::shutdown ()
|
|||||||
for (int i = MAX_GROUPS-1; i >= 0; i--)
|
for (int i = MAX_GROUPS-1; i >= 0; i--)
|
||||||
_groups[i]->shutdown();
|
_groups[i]->shutdown();
|
||||||
|
|
||||||
_initPosition = -1;
|
_initPosition = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -332,7 +332,7 @@ private:
|
|||||||
double _updateTimeRemainder;
|
double _updateTimeRemainder;
|
||||||
|
|
||||||
/// index of the member we are currently init-ing
|
/// index of the member we are currently init-ing
|
||||||
int _initPosition;
|
unsigned int _initPosition;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -406,7 +406,7 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
SGSubsystemGroup* _groups[MAX_GROUPS];
|
SGSubsystemGroup* _groups[MAX_GROUPS];
|
||||||
int _initPosition;
|
unsigned int _initPosition;
|
||||||
|
|
||||||
typedef std::map<std::string, SGSubsystem*> SubsystemDict;
|
typedef std::map<std::string, SGSubsystem*> SubsystemDict;
|
||||||
SubsystemDict _subsystem_map;
|
SubsystemDict _subsystem_map;
|
||||||
|
Loading…
Reference in New Issue
Block a user