summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2009-05-10 22:13:24 +0000
committerIan C <ianc@noddybox.co.uk>2009-05-10 22:13:24 +0000
commit0d2f672482fee91a9642a7cb6eb01fcdded79159 (patch)
tree9d5f21653c5703be76023c2a8905ecd51ff4f06a
parent737c093cddb6ad5c23bead4b2f98de27572e74be (diff)
Fixed compilation warnings with more recent GCC.
-rw-r--r--glgrav.cpp5
-rw-r--r--mass.h6
2 files changed, 6 insertions, 5 deletions
diff --git a/glgrav.cpp b/glgrav.cpp
index 3586e7d..8e7e6a7 100644
--- a/glgrav.cpp
+++ b/glgrav.cpp
@@ -31,6 +31,7 @@ static const char id[]="$Id$";
#include <cstdarg>
#include <ctime>
+#include <cstring>
static Config config;
static vector<Mass> mass;
@@ -114,7 +115,7 @@ static void HandleCollision(Config::Collide collide,
vector<bool>& del,vector<Mass>& mv,
Mass& m1, Mass& m2, int idx1, int idx2);
static void SetOption(int opt, string text, bool flag);
-static void GLPrint(char *fmt,...);
+static void GLPrint(const char *fmt,...);
int main(int argc, char *argv[])
@@ -934,7 +935,7 @@ static void Update(void)
}
-static void GLPrint(char *fmt,...)
+static void GLPrint(const char *fmt,...)
{
char s[256];
va_list va;
diff --git a/mass.h b/mass.h
index 296d7b2..0b18071 100644
--- a/mass.h
+++ b/mass.h
@@ -64,9 +64,9 @@ class Mass
string getName() const;
double getMass() const;
double getSize() const;
- void getPosition(double& x, double& x, double& x) const;
- void getPreviousPosition(double& x, double& x, double& x) const;
- void getDelta(double& dx, double& dx, double& dx) const;
+ void getPosition(double& x, double& y, double& z) const;
+ void getPreviousPosition(double& x, double& y, double& z) const;
+ void getDelta(double& dx, double& dy, double& dz) const;
void getColour(GLfloat& r, GLfloat& g, GLfloat& b) const;
bool isMassless() const;