mirror of
https://github.com/zeldaret/ss
synced 2026-07-11 14:48:32 -04:00
More d/lyt (#52)
* More Lyt (maybe some wrong type associations) * more meter * Rename * More splits and renames * Fix SizedString conversion operators * Renames * dLytBattery_c almost OK * d_lyt_battery OK * diff clean * Continue doing splits while I'm at it * two more splits
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
|
||||
#include <MSL_C/string.h>
|
||||
|
||||
extern "C" bool strequals(const char *a, const char *b);
|
||||
|
||||
/**
|
||||
* A statically sized string buffer used for resource
|
||||
* identification where strings are guaranteed to be short.
|
||||
@@ -23,11 +25,11 @@ struct SizedString {
|
||||
|
||||
char mChars[Size];
|
||||
|
||||
char *operator&() {
|
||||
operator char *() {
|
||||
return mChars;
|
||||
}
|
||||
|
||||
const char *operator&() const {
|
||||
operator const char *() const {
|
||||
return mChars;
|
||||
}
|
||||
|
||||
@@ -57,6 +59,10 @@ struct SizedString {
|
||||
}
|
||||
}
|
||||
|
||||
bool operator==(const char* other) const {
|
||||
return strequals(mChars, other);
|
||||
}
|
||||
|
||||
int sprintf(const char *fmt, ...) {
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
|
||||
Reference in New Issue
Block a user