Browse Source

build: fix compiler warnings and Linux and PS3 build issues.

legacy
Sam Hocevar sam 11 years ago
parent
commit
bb28344eb7
6 changed files with 7 additions and 5 deletions
  1. +1
    -0
      configure.ac
  2. +2
    -1
      src/easymesh/easymesh.h
  3. +1
    -1
      src/lol/math/interp.h
  4. +1
    -1
      src/numeric.h
  5. +1
    -1
      src/scene.cpp
  6. +1
    -1
      src/ticker.cpp

+ 1
- 0
configure.ac View File

@@ -442,6 +442,7 @@ AC_CONFIG_FILES(
people/peeweek/private/Makefile people/peeweek/private/Makefile
people/touky/Makefile people/touky/Makefile
people/touky/private/Makefile people/touky/private/Makefile
people/touky/private/Tactics/Makefile
people/jylam/Makefile people/jylam/Makefile
people/jylam/private/Makefile people/jylam/private/Makefile
people/jylam/private/chat/Makefile people/jylam/private/chat/Makefile


+ 2
- 1
src/easymesh/easymesh.h View File

@@ -65,7 +65,7 @@ public:
ShaderUniform const *GetUniform(const lol::String &uniform); ShaderUniform const *GetUniform(const lol::String &uniform);
ShaderAttrib const *GetAttribute(const lol::String &attribute); ShaderAttrib const *GetAttribute(const lol::String &attribute);
//-- //--
virtual void SetupShaderDatas(mat4 const &model) { }
virtual void SetupShaderDatas(mat4 const &model) { UNUSED(model); }


protected: protected:
uint16_t m_vert_decl_flags; uint16_t m_vert_decl_flags;
@@ -356,6 +356,7 @@ public:
else else
{ {
TexCoordBuildType tcbt = GetTexCoordBuildType2(mt); TexCoordBuildType tcbt = GetTexCoordBuildType2(mt);
UNUSED(tcbt);
if (mt == MeshType::Triangle) if (mt == MeshType::Triangle)
mt = mt; mt = mt;
else if (mt == MeshType::Quad) else if (mt == MeshType::Quad)


+ 1
- 1
src/lol/math/interp.h View File

@@ -50,7 +50,7 @@ public:


int start = max(0, m_pos); int start = max(0, m_pos);
int a = 0; int a = 0;
int b = min(m_pos + N, N);
int b = min(m_pos + N - 1, N - 1);


while (a + 1 < b) while (a + 1 < b)
{ {


+ 1
- 1
src/numeric.h View File

@@ -26,7 +26,7 @@ namespace lol
static inline float RandF() static inline float RandF()
{ {
using namespace std; using namespace std;
return (float)rand() / RAND_MAX;
return (float)std::rand() / RAND_MAX;
} }


static inline float RandF(float val) static inline float RandF(float val)


+ 1
- 1
src/scene.cpp View File

@@ -175,7 +175,7 @@ void Scene::Render() // XXX: rename to Blit()
for (int i = 0; i < data->m_tiles.Count(); i++) for (int i = 0; i < data->m_tiles.Count(); i++)
{ {
Tile tmp = data->m_tiles[i]; Tile tmp = data->m_tiles[i];
int j = rand() % data->m_tiles.Count();
int j = std::rand() % data->m_tiles.Count();
data->m_tiles[i] = data->m_tiles[j]; data->m_tiles[i] = data->m_tiles[j];
data->m_tiles[j] = tmp; data->m_tiles[j] = tmp;
} }


+ 1
- 1
src/ticker.cpp View File

@@ -185,7 +185,7 @@ void *TickerData::GameThreadMain(void * /* p */)
data->frame++; data->frame++;


/* Ensure some randomness */ /* Ensure some randomness */
(void)rand();
(void)std::rand();


/* If recording with fixed framerate, set deltatime to a fixed value */ /* If recording with fixed framerate, set deltatime to a fixed value */
if (data->recording && data->fps) if (data->recording && data->fps)


Loading…
Cancel
Save