Remove the global namespace a bit and remove some dead code.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7043 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Soren Jorvang
2011-02-02 18:21:20 +00:00
parent 9a975705bf
commit 9c21d003af
67 changed files with 145 additions and 625 deletions
+1 -1
View File
@@ -60,7 +60,7 @@ static inline void do_cpuid(unsigned int *eax, unsigned int *ebx,
#endif
}
void __cpuid(int info[4], int x)
static void __cpuid(int info[4], int x)
{
unsigned int eax = x, ebx = 0, ecx = 0, edx = 0;
do_cpuid(&eax, &ebx, &ecx, &edx);
-1
View File
@@ -47,7 +47,6 @@ _mm_shuffle_epi8(__m128i a, __m128i mask)
#include <byteswap.h>
#else
char * strndup(char const *s, size_t n);
size_t strnlen(const char *s, size_t n);
#endif
// go to debugger mode
-16
View File
@@ -89,22 +89,6 @@ u32 HashAdler32(const u8* data, size_t len)
return((b << 16) | a);
}
// Another fast and decent hash
u32 HashFNV(const u8* ptr, int length)
{
u32 hash = 0x811c9dc5;
for (int i = 0; i < length; i++)
{
hash *= 1677761;
hash ^= ptr[i];
}
return(hash);
}
// Stupid hash - but can't go back now :)
// Don't use for new things. At least it's reasonably fast.
u32 HashEctor(const u8* ptr, int length)
+1 -1
View File
@@ -39,7 +39,7 @@ const char *GetLastErrorMsg()
#if !defined(__linux__) && !defined(_WIN32)
// strlen with cropping after size n
size_t strnlen(const char *s, size_t n)
static size_t strnlen(const char *s, size_t n)
{
const char *p = (const char *)memchr(s, 0, n);
-18
View File
@@ -122,17 +122,6 @@ std::string StripQuotes(const std::string& s)
return s;
}
// "\"hello\"" is turned to "hello"
// This one assumes that the string has already been space stripped in both
// ends, as done by StripSpaces above, for example.
std::string StripNewline(const std::string& s)
{
if (s.size() && '\n' == *s.rbegin())
return s.substr(0, s.size() - 1);
else
return s;
}
bool TryParse(const std::string &str, u32 *const output)
{
char *endptr = NULL;
@@ -201,13 +190,6 @@ bool SplitPath(const std::string& full_path, std::string* _pPath, std::string* _
return true;
}
std::string PathToFilename(const std::string &Path)
{
std::string Name, Ending;
SplitPath(Path, 0, &Name, &Ending);
return Name + Ending;
}
void BuildCompleteFilename(std::string& _CompleteFilename, const std::string& _Path, const std::string& _Filename)
{
_CompleteFilename = _Path;
-3
View File
@@ -45,7 +45,6 @@ std::string ArrayToString(const u8 *data, u32 size, int line_len = 20, bool spac
std::string StripSpaces(const std::string &s);
std::string StripQuotes(const std::string &s);
std::string StripNewline(const std::string &s);
// Thousand separator. Turns 12345678 into 12,345,678
template <typename I>
@@ -92,8 +91,6 @@ void SplitString(const std::string& str, char delim, std::vector<std::string>& o
// "C:/Windows/winhelp.exe" to "C:/Windows/", "winhelp", ".exe"
bool SplitPath(const std::string& full_path, std::string* _pPath, std::string* _pFilename, std::string* _pExtension);
// "C:/Windows/winhelp.exe" to "winhelp.exe"
std::string PathToFilename(const std::string &Path);
void BuildCompleteFilename(std::string& _CompleteFilename, const std::string& _Path, const std::string& _Filename);