[Avida-SVN] r1936 - in development/source: . cpu main
brysonda at myxo.css.msu.edu
brysonda at myxo.css.msu.edu
Wed Aug 15 09:37:32 PDT 2007
Author: brysonda
Date: 2007-08-15 12:37:32 -0400 (Wed, 15 Aug 2007)
New Revision: 1936
Modified:
development/source/cpu/cCPUStack.h
development/source/cpu/cHardwareBase.h
development/source/cpu/cHardwareCPU.h
development/source/cpu/cHardwareExperimental.h
development/source/cpu/cHardwareGX.h
development/source/cpu/cHardwareSMT.h
development/source/cpu/cHardwareTransSMT.h
development/source/defs.h
development/source/main/cPhenotype.h
development/source/main/cSpatialCountElem.h
development/source/main/cSpatialResCount.cc
development/source/main/cSpatialResCount.h
development/source/main/cTaskEntry.h
Log:
Fix various minor errors that Intel's ICC complained about.
Modified: development/source/cpu/cCPUStack.h
===================================================================
--- development/source/cpu/cCPUStack.h 2007-08-15 04:07:54 UTC (rev 1935)
+++ development/source/cpu/cCPUStack.h 2007-08-15 16:37:32 UTC (rev 1936)
@@ -48,7 +48,7 @@
inline void Push(int value);
inline int Pop();
inline int& Peek() { return stack[stack_pointer]; }
- inline const int Peek() const { return stack[stack_pointer]; }
+ inline int Peek() const { return stack[stack_pointer]; }
inline int Get(int depth=0) const;
inline void Clear();
inline int Top();
Modified: development/source/cpu/cHardwareBase.h
===================================================================
--- development/source/cpu/cHardwareBase.h 2007-08-15 04:07:54 UTC (rev 1935)
+++ development/source/cpu/cHardwareBase.h 2007-08-15 16:37:32 UTC (rev 1936)
@@ -146,7 +146,7 @@
// -------- Register Manipulation --------
- virtual const int GetRegister(int reg_id) const = 0;
+ virtual int GetRegister(int reg_id) const = 0;
virtual int& GetRegister(int reg_id) = 0;
virtual int GetNumRegisters() const = 0;
Modified: development/source/cpu/cHardwareCPU.h
===================================================================
--- development/source/cpu/cHardwareCPU.h 2007-08-15 04:07:54 UTC (rev 1935)
+++ development/source/cpu/cHardwareCPU.h 2007-08-15 16:37:32 UTC (rev 1936)
@@ -252,7 +252,7 @@
// -------- Register Manipulation --------
- const int GetRegister(int reg_id) const { return m_threads[m_cur_thread].reg[reg_id]; }
+ int GetRegister(int reg_id) const { return m_threads[m_cur_thread].reg[reg_id]; }
int& GetRegister(int reg_id) { return m_threads[m_cur_thread].reg[reg_id]; }
int GetNumRegisters() const { return NUM_REGISTERS; }
Modified: development/source/cpu/cHardwareExperimental.h
===================================================================
--- development/source/cpu/cHardwareExperimental.h 2007-08-15 04:07:54 UTC (rev 1935)
+++ development/source/cpu/cHardwareExperimental.h 2007-08-15 16:37:32 UTC (rev 1936)
@@ -237,7 +237,7 @@
// -------- Register Manipulation --------
- const int GetRegister(int reg_id) const { return m_threads[m_cur_thread].reg[reg_id]; }
+ int GetRegister(int reg_id) const { return m_threads[m_cur_thread].reg[reg_id]; }
int& GetRegister(int reg_id) { return m_threads[m_cur_thread].reg[reg_id]; }
int GetNumRegisters() const { return NUM_REGISTERS; }
Modified: development/source/cpu/cHardwareGX.h
===================================================================
--- development/source/cpu/cHardwareGX.h 2007-08-15 04:07:54 UTC (rev 1935)
+++ development/source/cpu/cHardwareGX.h 2007-08-15 16:37:32 UTC (rev 1936)
@@ -348,7 +348,7 @@
// -------- Register Manipulation --------
- const int GetRegister(int reg_id) const { assert(m_current); return m_current->m_regs[reg_id]; }
+ int GetRegister(int reg_id) const { assert(m_current); return m_current->m_regs[reg_id]; }
int& GetRegister(int reg_id) { assert(m_current); return m_current->m_regs[reg_id]; }
int GetNumRegisters() const { return NUM_REGISTERS; }
Modified: development/source/cpu/cHardwareSMT.h
===================================================================
--- development/source/cpu/cHardwareSMT.h 2007-08-15 04:07:54 UTC (rev 1935)
+++ development/source/cpu/cHardwareSMT.h 2007-08-15 16:37:32 UTC (rev 1936)
@@ -238,7 +238,7 @@
// -------- Register Manipulation --------
- const int GetRegister(int reg_id) const { return Stack(reg_id).Peek(); }
+ int GetRegister(int reg_id) const { return Stack(reg_id).Peek(); }
int& GetRegister(int reg_id) { return Stack(reg_id).Peek(); }
int GetNumRegisters() const { return NUM_STACKS; }
Modified: development/source/cpu/cHardwareTransSMT.h
===================================================================
--- development/source/cpu/cHardwareTransSMT.h 2007-08-15 04:07:54 UTC (rev 1935)
+++ development/source/cpu/cHardwareTransSMT.h 2007-08-15 16:37:32 UTC (rev 1936)
@@ -237,7 +237,7 @@
// -------- Register Manipulation --------
- const int GetRegister(int reg_id) const { return Stack(reg_id).Peek(); }
+ int GetRegister(int reg_id) const { return Stack(reg_id).Peek(); }
int& GetRegister(int reg_id) { return Stack(reg_id).Peek(); }
int GetNumRegisters() const { return NUM_STACKS; }
Modified: development/source/defs.h
===================================================================
--- development/source/defs.h 2007-08-15 04:07:54 UTC (rev 1935)
+++ development/source/defs.h 2007-08-15 16:37:32 UTC (rev 1936)
@@ -158,7 +158,7 @@
BASE_MERIT_NUM_BONUS_INST
};
-typedef enum eVerbosity {
+enum eVerbosity {
VERBOSE_SILENT = 0, // No output at all
VERBOSE_NORMAL, // Notification at start of commands.
VERBOSE_ON, // Verbose output, detailing progress
Modified: development/source/main/cPhenotype.h
===================================================================
--- development/source/main/cPhenotype.h 2007-08-15 04:07:54 UTC (rev 1935)
+++ development/source/main/cPhenotype.h 2007-08-15 16:37:32 UTC (rev 1936)
@@ -316,7 +316,7 @@
double GetLastMeritBase() const { assert(initialized == true); return last_merit_base; }
double GetLastBonus() const { assert(initialized == true); return last_bonus; }
- const double GetLastMerit() const { assert(initialized == true); return last_merit_base*last_bonus; }
+ double GetLastMerit() const { assert(initialized == true); return last_merit_base*last_bonus; }
int GetLastNumErrors() const { assert(initialized == true); return last_num_errors; }
int GetLastNumDonates() const { assert(initialized == true); return last_num_donates; }
const tArray<int>& GetLastTaskCount() const { assert(initialized == true); return last_task_count; }
Modified: development/source/main/cSpatialCountElem.h
===================================================================
--- development/source/main/cSpatialCountElem.h 2007-08-15 04:07:54 UTC (rev 1935)
+++ development/source/main/cSpatialCountElem.h 2007-08-15 16:37:32 UTC (rev 1936)
@@ -43,7 +43,7 @@
void Rate(double ratein) const { delta += ratein; }
void State() { amount += delta; delta = 0.0; }
- const double GetAmount() const { return amount; }
+ double GetAmount() const { return amount; }
void SetAmount(double res) const { amount = res; }
void SetPtr(int innum, int inelempt, int inxdist, int inydist, double indist);
int GetElemPtr(int innum) { return elempt[innum]; }
Modified: development/source/main/cSpatialResCount.cc
===================================================================
--- development/source/main/cSpatialResCount.cc 2007-08-15 04:07:54 UTC (rev 1935)
+++ development/source/main/cSpatialResCount.cc 2007-08-15 16:37:32 UTC (rev 1936)
@@ -273,7 +273,7 @@
/* Get the state of one element using the array index */
-const double cSpatialResCount::GetAmount(int x) const {
+double cSpatialResCount::GetAmount(int x) const {
if (x >= 0 && x < grid.GetSize()) {
return grid[x].GetAmount();
} else {
@@ -283,7 +283,7 @@
/* Get the state of one element using the the x,y coordinate */
-const double cSpatialResCount::GetAmount(int x, int y) const {
+double cSpatialResCount::GetAmount(int x, int y) const {
if (x >= 0 && x < world_x && y >= 0 && y < world_y) {
return grid[y*world_x + x].GetAmount();
} else {
@@ -337,7 +337,7 @@
/* Total up all the resources in each cell */
-const double cSpatialResCount::SumAll() const{
+double cSpatialResCount::SumAll() const{
int i;
double sum = 0.0;
Modified: development/source/main/cSpatialResCount.h
===================================================================
--- development/source/main/cSpatialResCount.h 2007-08-15 04:07:54 UTC (rev 1935)
+++ development/source/main/cSpatialResCount.h 2007-08-15 16:37:32 UTC (rev 1936)
@@ -71,12 +71,12 @@
void Rate(int x, int y, double ratein) const;
void State(int x);
void State(int x, int y);
- const double GetAmount(int x) const;
- const double GetAmount(int x, int y) const;
+ double GetAmount(int x) const;
+ double GetAmount(int x, int y) const;
void RateAll(double ratein);
void StateAll();
void FlowAll();
- const double SumAll() const;
+ double SumAll() const;
void Source(double amount) const;
void CellInflow() const;
void Sink(double percent) const;
Modified: development/source/main/cTaskEntry.h
===================================================================
--- development/source/main/cTaskEntry.h 2007-08-15 04:07:54 UTC (rev 1935)
+++ development/source/main/cTaskEntry.h 2007-08-15 16:37:32 UTC (rev 1936)
@@ -60,8 +60,8 @@
const cString& GetName() const { return m_name; }
const cString& GetDesc() const { return m_desc; }
- const int GetID() const { return m_id; }
- const tTaskTest GetTestFun() const { return m_test_fun; }
+ int GetID() const { return m_id; }
+ tTaskTest GetTestFun() const { return m_test_fun; }
bool HasArguments() const { return (m_args != NULL); }
cArgContainer& GetArguments() const { return *m_args; }
More information about the Avida-cvs
mailing list