RetroArch
deps
glslang
glslang
glslang
MachineIndependent
preprocessor
Compare.h
Go to the documentation of this file.
1
#ifndef _MACHINE_INDEPENDENT_COMPARE_H
2
#define _MACHINE_INDEPENDENT_COMPARE_H
3
4
#include "../../../hlsl/hlslTokens.h"
5
6
namespace
{
7
8
struct
str_eq
9
{
10
bool
operator()(
const
char
* lhs,
const
char
* rhs)
const
11
{
12
return
strcmp
(lhs, rhs) == 0;
13
}
14
};
15
16
struct
str_hash
17
{
18
size_t
operator()(
const
char
*
str
)
const
19
{
20
// djb2
21
unsigned
long
hash = 5381;
22
int
c
;
23
24
while
((
c
= *
str
++) != 0)
25
hash = ((hash << 5) + hash) +
c
;
26
27
return
hash;
28
}
29
};
30
};
31
32
#endif
c
const GLubyte * c
Definition:
glext.h:9812
strcmp
int strcmp(const char *s1, const char *s2)
Definition:
compat_ctype.c:116
str
const char *const str
Definition:
portlistingparse.c:18
Generated by
1.8.15