const as const can

svn-id: r10555
This commit is contained in:
Max Horn 2003-10-03 00:59:27 +00:00
parent bebaf0e0fc
commit 2ed4677ede
4 changed files with 7 additions and 7 deletions

View File

@ -324,9 +324,9 @@ void IMuseInternal::on_timer(MidiDriver *midi) {
sequencer_timers(midi);
}
int IMuseInternal::getMusicTimer() {
int IMuseInternal::getMusicTimer() const {
int best_time = 0;
Player *player = _players;
const Player *player = _players;
int i;
for (i = ARRAYSIZE(_players); i != 0; i--, player++) {
@ -1767,7 +1767,7 @@ void IMuse::stopSound(int sound) { in(); _target->stopSound(sound); out(); }
void IMuse::stopAllSounds() { in(); _target->stopAllSounds(); out(); }
int IMuse::getSoundStatus(int sound) const { in(); int ret = _target->getSoundStatus(sound, true); out(); return ret; }
bool IMuse::get_sound_active(int sound) const { in(); bool ret = _target->getSoundStatus(sound, false) ? 1 : 0; out(); return ret; }
int IMuse::getMusicTimer() { in(); int ret = _target->getMusicTimer(); out(); return ret; }
int IMuse::getMusicTimer() const { in(); int ret = _target->getMusicTimer(); out(); return ret; }
int32 IMuse::doCommand (int a, int b, int c, int d, int e, int f, int g, int h) { in(); int32 ret = _target->doCommand(a,b,c,d,e,f,g,h); out(); return ret; }
int32 IMuse::doCommand (int numargs, int args[]) { in(); int32 ret = _target->doCommand (numargs, args); out(); return ret; }
int IMuse::clear_queue() { in(); int ret = _target->clear_queue(); out(); return ret; }

View File

@ -68,7 +68,7 @@ public:
void stopAllSounds();
int getSoundStatus(int sound) const;
bool get_sound_active(int sound) const;
int getMusicTimer();
int getMusicTimer() const;
int32 doCommand (int a, int b, int c, int d, int e, int f, int g, int h);
int32 doCommand (int numargs, int args[]);
int clear_queue();

View File

@ -257,7 +257,7 @@ public:
int setTranspose(byte relative, int b);
int setVolume(byte vol);
bool startSound(int sound, MidiDriver *midi);
int getMusicTimer();
int getMusicTimer() const;
public:
// MidiDriver interface
@ -460,7 +460,7 @@ public:
int stopSound(int sound);
int stopAllSounds();
int getSoundStatus(int sound, bool ignoreFadeouts = true) const;
int getMusicTimer();
int getMusicTimer() const;
int32 doCommand (int a, int b, int c, int d, int e, int f, int g, int h);
int32 doCommand (int numargs, int args[]);
int clear_queue();

View File

@ -127,7 +127,7 @@ bool Player::startSound(int sound, MidiDriver *midi) {
return true;
}
int Player::getMusicTimer() {
int Player::getMusicTimer() const {
return _parser ? (_parser->getTick() * 2 / _parser->getPPQN()) : 0;
}