Sfoglia il codice sorgente

ps3: some compilation fixes.

undefined
Sam Hocevar 11 anni fa
parent
commit
a7d169caff
2 ha cambiato i file con 13 aggiunte e 30 eliminazioni
  1. +5
    -0
      src/gpu/shader.cpp
  2. +8
    -30
      src/lol/base/string.h

+ 5
- 0
src/gpu/shader.cpp Vedi File

@@ -404,7 +404,12 @@ Shader::Shader(char const *vert, char const *frag)

int Shader::GetAttribCount() const
{
#if !defined __CELLOS_LV2__
return data->attrib_locations.Count();
#else
// TODO
return 0;
#endif
}

ShaderAttrib Shader::GetAttribLocation(VertexUsage usage, int index) const


+ 8
- 30
src/lol/base/string.h Vedi File

@@ -192,40 +192,18 @@ public:
return -1;
}

bool StartsWith(char const* token) const
bool StartsWith(String const &s) const
{
const char* p = C();
while (*token != '\0')
{
if (*p != *token)
return false;

++p;
++token;
}

return true;
using namespace std;
return Count() >= s.Count()
&& memcmp(C(), s.C(), s.Count()) == 0;
}

bool EndsWith(char const* token) const
bool EndsWith(String const &s) const
{
const char* p = C();
int token_idx = strlen(token) - 1;
int c_idx = strlen(p) - 1;

if (c_idx < token_idx)
return false;

while (token_idx >= 0)
{
if (token[token_idx] != p[c_idx])
return false;

--token_idx;
--c_idx;
}

return true;
using namespace std;
return Count() >= s.Count()
&& memcmp(C() + Count() - s.Count(), s.C(), s.Count()) == 0;
}

inline String operator +(String const &s) const


Caricamento…
Annulla
Salva