remove trailing whitespace

This commit is contained in:
Hubert Jarosz
2016-03-09 00:00:52 +01:00
parent 1dad6eca81
commit 4a4f247914
386 changed files with 7664 additions and 7664 deletions

View File

@@ -46,16 +46,16 @@ struct StaticCString {
class StringName {
enum {
STRING_TABLE_BITS=12,
STRING_TABLE_LEN=1<<STRING_TABLE_BITS,
STRING_TABLE_MASK=STRING_TABLE_LEN-1
};
struct _Data {
struct _Data {
SafeRefCount refcount;
const char* cname;
String name;
@@ -67,32 +67,32 @@ class StringName {
_Data *next;
_Data() { cname=NULL; next=prev=NULL; hash=0; }
};
static _Data *_table[STRING_TABLE_LEN];
_Data *_data;
union _HashUnion {
_Data *ptr;
uint32_t hash;
};
void unref();
friend void register_core_types();
friend void unregister_core_types();
static void setup();
static void cleanup();
static bool configured;
StringName(_Data *p_data) { _data=p_data; }
public:
operator const void*() const { return (_data && (_data->cname || !_data->name.empty()))?(void*)1:0; }
bool operator==(const String& p_name) const;
bool operator==(const char* p_name) const;
bool operator!=(const String& p_name) const;
@@ -101,19 +101,19 @@ public:
return _data<p_name._data;
}
_FORCE_INLINE_ bool operator==(const StringName& p_name) const {
// the real magic of all this mess happens here.
// the real magic of all this mess happens here.
// this is why path comparisons are very fast
return _data==p_name._data;
}
}
_FORCE_INLINE_ uint32_t hash() const {
if (_data)
return _data->hash;
else
return 0;
}
bool operator!=(const StringName& p_name) const;
_FORCE_INLINE_ operator String() const {
if (_data) {
@@ -148,7 +148,7 @@ public:
};
struct StringNameHasher {
static _FORCE_INLINE_ uint32_t hash(const StringName &p_string) { return p_string.hash(); }
};