diff --git a/src/gpu/shader.cpp b/src/gpu/shader.cpp index 294005c2..eaf8c911 100644 --- a/src/gpu/shader.cpp +++ b/src/gpu/shader.cpp @@ -60,8 +60,8 @@ private: ID3DXConstantTable *vert_table, *frag_table; #elif !defined __CELLOS_LV2__ GLuint prog_id, vert_id, frag_id; - // Benlitz: using a simple array could be faster since there is never more than a few attribute locations to store - Map attrib_locations; + // Benlitz: using a simple array could be faster since there is never more than a few attribute locations to store + Map attrib_locations; #else CGprogram vert_id, frag_id; #endif @@ -334,21 +334,21 @@ ShaderAttrib Shader::GetAttribLocation(char const *attr, ret.m_flags |= (uint64_t)(uint16_t)index; #if defined USE_D3D9 || defined _XBOX #elif !defined __CELLOS_LV2__ - GLint l; - - if (!data->attrib_locations.TryGetValue(attr, l)) - { - l = glGetAttribLocation(data->prog_id, attr); - if (l < 0) - { - Log::Warn("tried to query invalid attribute: %s\n", attr); - l = 0; - } - else - { - data->attrib_locations[String(attr)] = l; - } - } + GLint l; + + if (!data->attrib_locations.TryGetValue(attr, l)) + { + l = glGetAttribLocation(data->prog_id, attr); + if (l < 0) + { + Log::Warn("tried to query invalid attribute: %s\n", attr); + l = 0; + } + else + { + data->attrib_locations[String(attr)] = l; + } + } ret.m_flags |= (uint64_t)(uint32_t)l << 32; #else /* FIXME: can we do this at all on the PS3? */ diff --git a/src/lol/base/map.h b/src/lol/base/map.h index 55649126..14e2745a 100644 --- a/src/lol/base/map.h +++ b/src/lol/base/map.h @@ -24,13 +24,13 @@ namespace lol template class Map : protected Hash { public: - /* If E is different from K, Hash must implement operator()(E const&) + /* If E is different from K, Hash must implement operator()(E const&) * and an equality operator between K and E must exist in order to use this method. */ /* I choose to make this inline because passing the key by reference * is usually suboptimal. */ - template + template inline V const& operator[] (E const &key) const { /* Look for the hash in our table and return the value. */ @@ -44,7 +44,7 @@ public: return V(); } - template + template inline V & operator[] (E const &key) { /* Look for the hash in our table and return the value if found. */ @@ -58,7 +58,7 @@ public: return m_array.Last().m3; } - template + template inline void Remove(E const &key) { uint32_t hash = ((Hash const &)*this)(key); @@ -71,7 +71,7 @@ public: } } - template + template inline bool HasKey(E const &key) { uint32_t hash = ((Hash const &)*this)(key); @@ -82,7 +82,7 @@ public: return false; } - template + template inline bool TryGetValue(E const &key, V& value) { uint32_t hash = ((Hash const &)*this)(key); diff --git a/src/lol/gpu/texture.h b/src/lol/gpu/texture.h index d2a4f013..82faea5a 100644 --- a/src/lol/gpu/texture.h +++ b/src/lol/gpu/texture.h @@ -100,7 +100,7 @@ public: void SetMagFiltering(TextureMagFilter filter); void SetMinFiltering(TextureMinFilter filter); - void GenerateMipmaps(); + void GenerateMipmaps(); ShaderTexture GetTexture() const; diff --git a/src/lol/math/vector.h b/src/lol/math/vector.h index 2607cd9d..c2b6e093 100644 --- a/src/lol/math/vector.h +++ b/src/lol/math/vector.h @@ -1792,7 +1792,7 @@ template struct Mat4 static Mat4 frustum(T left, T right, T bottom, T top, T near, T far); static Mat4 perspective(T fov_y, T width, T height, T near, T far); static Mat4 shifted_perspective(T fov_y, T screen_size, T screen_ratio_xy, T draw_distance); - + void printf() const; template diff --git a/test/meshviewer.cpp b/test/meshviewer.cpp index a70539d4..7a602c13 100644 --- a/test/meshviewer.cpp +++ b/test/meshviewer.cpp @@ -274,7 +274,7 @@ public: cur_cam->SetProjection(mat4::shifted_perspective(m_fov_damp, screen_size * fov_ratio * 1.1f, 1600.f / 600.f, 1000.f)); vec3 cam_center = cam_min_max[0] + min_max_diff * .5f; - + vec4 test = inverse(world_cam) * vec4(.0f,.0f,-1.0f,1.f); test = test; test = inverse(world_cam) * vec4(.0f,.0f,.0f,1.f); diff --git a/test/unit/string.cpp b/test/unit/string.cpp index 7ec25a5b..496514b9 100644 --- a/test/unit/string.cpp +++ b/test/unit/string.cpp @@ -123,9 +123,9 @@ LOLUNIT_FIXTURE(StringTest) LOLUNIT_ASSERT(!(s1 != s3)); } - LOLUNIT_TEST(StringCharsEqual) + LOLUNIT_TEST(StringCharsEqual) { - char const* sz = "abc"; + char const* sz = "abc"; String s1("abc"); String s2("ab"); @@ -135,9 +135,9 @@ LOLUNIT_FIXTURE(StringTest) LOLUNIT_ASSERT(!(sz == s2)); } - LOLUNIT_TEST(StringCharsDifferent) + LOLUNIT_TEST(StringCharsDifferent) { - char const* sz = "abc"; + char const* sz = "abc"; String s1("ab"); String s2("abc");