A few more const and method cleanups.

git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3012 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2014-10-22 14:54:25 +00:00
parent 920dcdb8a5
commit ebf44d2631
10 changed files with 13 additions and 18 deletions

View File

@ -48,7 +48,7 @@ class SoundNull : public Sound
/** /**
Destructor Destructor
*/ */
virtual ~SoundNull(); virtual ~SoundNull() { }
public: public:
/** /**

View File

@ -482,7 +482,7 @@ void SoundSDL2::RegWriteQueue::dequeue()
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
double SoundSDL2::RegWriteQueue::duration() double SoundSDL2::RegWriteQueue::duration() const
{ {
double duration = 0.0; double duration = 0.0;
for(uInt32 i = 0; i < mySize; ++i) for(uInt32 i = 0; i < mySize; ++i)
@ -506,7 +506,7 @@ void SoundSDL2::RegWriteQueue::enqueue(const RegWrite& info)
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SoundSDL2::RegWrite& SoundSDL2::RegWriteQueue::front() SoundSDL2::RegWrite& SoundSDL2::RegWriteQueue::front() const
{ {
assert(mySize != 0); assert(mySize != 0);
return myBuffer[myHead]; return myBuffer[myHead];

View File

@ -212,7 +212,7 @@ class SoundSDL2 : public Sound
/** /**
Return the duration of all the items in the queue. Return the duration of all the items in the queue.
*/ */
double duration(); double duration() const;
/** /**
Enqueue the specified object. Enqueue the specified object.
@ -224,7 +224,7 @@ class SoundSDL2 : public Sound
@return The item at the front of the queue. @return The item at the front of the queue.
*/ */
RegWrite& front(); RegWrite& front() const;
/** /**
Answers the number of items currently in the queue. Answers the number of items currently in the queue.

View File

@ -28,8 +28,9 @@
the codebase. The keycodes are exactly the same, but from the POV of the the codebase. The keycodes are exactly the same, but from the POV of the
rest of the code, they are *KBD* (keyboard) keys, not *SDL* keys. rest of the code, they are *KBD* (keyboard) keys, not *SDL* keys.
Once the codebase is ported to SDL2, the intent is to simply change this If the codebase is ported to future SDL versions or to some other toolkit,
file without having to modify all other classes that use StellaKey. the intent is to simply change this file without having to modify all
other classes that use StellaKey.
@author Stephen Anthony @author Stephen Anthony
*/ */

View File

@ -22,7 +22,7 @@
#include <cstdlib> #include <cstdlib>
#define STELLA_VERSION "4.2_beta1" #define STELLA_VERSION "4.2_beta2"
#define STELLA_BUILD atoi("$Rev$" + 6) #define STELLA_BUILD atoi("$Rev$" + 6)
#endif #endif

View File

@ -215,7 +215,7 @@ void NTSCFilter::saveConfig(Settings& settings) const
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void NTSCFilter::getAdjustables(Adjustable& adjustable, Preset preset) void NTSCFilter::getAdjustables(Adjustable& adjustable, Preset preset) const
{ {
switch(preset) switch(preset)
{ {

View File

@ -84,7 +84,7 @@ class NTSCFilter
// Get adjustables for the given preset // Get adjustables for the given preset
// Values will be scaled to 0 - 100 range, independent of how // Values will be scaled to 0 - 100 range, independent of how
// they're actually stored internally // they're actually stored internally
void getAdjustables(Adjustable& adjustable, Preset preset); void getAdjustables(Adjustable& adjustable, Preset preset) const;
// Set custom adjustables to given values // Set custom adjustables to given values
// Values will be scaled to 0 - 100 range, independent of how // Values will be scaled to 0 - 100 range, independent of how

View File

@ -53,7 +53,7 @@ class CpuDebug : public DebuggerSystem
string toString() { return ""; } // Not needed, since CPU stuff is always visible string toString() { return ""; } // Not needed, since CPU stuff is always visible
// I know, we ain't supposed to do this... // I know, we ain't supposed to do this...
M6502& m6502() { return mySystem.m6502(); } M6502& m6502() const { return mySystem.m6502(); }
int pc() { return mySystem.m6502().PC; } int pc() { return mySystem.m6502().PC; }
int sp() { return mySystem.m6502().SP; } int sp() { return mySystem.m6502().SP; }

View File

@ -430,12 +430,6 @@ bool Debugger::writeTrap(int t)
return myWriteTraps->isSet(t) != 0; return myWriteTraps->isSet(t) != 0;
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int Debugger::cycles()
{
return mySystem.cycles();
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void Debugger::nextScanline(int lines) void Debugger::nextScanline(int lines)
{ {

View File

@ -174,7 +174,7 @@ class Debugger : public DialogContainer
/** /**
The current cycle count of the System. The current cycle count of the System.
*/ */
int cycles(); int cycles() const { return mySystem.cycles(); }
string autoExec(); string autoExec();