Conversation
MonsterDruide1
left a comment
There was a problem hiding this comment.
@MonsterDruide1 reviewed 3 of 3 files at r1, all commit messages.
Reviewable status: all files reviewed, 9 unresolved discussions (waiting on @Muz-dev)
a discussion (no related file):
For header and source: Replace char16_t with char16 from sead
CMakeLists.txt line 4 at r1 (raw file):
file(GLOB_RECURSE HEADER_FILES "include/*.h") file(GLOB_RECURSE SRC "src/*.cpp")
Suggestion:
file(GLOB_RECURSE HEADERS CONFIGURE_DEPENDS include/*.h)
file(GLOB_RECURSE SRC CONFIGURE_DEPENDS src/*.cpp)CMakeLists.txt line 21 at r1 (raw file):
target_link_libraries(eui PUBLIC agl) if(NOT TARGET sead) add_subdirectory(../sead)
Suggestion:
add_subdirectory(../sead)CMakeLists.txt line 24 at r1 (raw file):
endif() target_link_libraries(eui PUBLIC sead)
Suggestion:
endif()
target_link_libraries(eui PUBLIC sead)include/message/euiMessageString.h line 12 at r1 (raw file):
class iterator { public: iterator(const char16_t* ptr, u32 index = 0) : mPtr(ptr), mIndex(index) {}
Suggestion:
iterator(const char16_t* ptr, s32 index = 0) : mPtr(ptr), mIndex(index) {}include/message/euiMessageString.h line 39 at r1 (raw file):
private: const char16_t* mStr; u32 mStrLen;
Suggestion:
s32 mStrLen;src/message/euiMessageString.cpp line 10 at r1 (raw file):
mStr = nullptr; mStrLen = 0; }
Move default values to header
Suggestion:
MessageString::MessageString() = default;src/message/euiMessageString.cpp line 30 at r1 (raw file):
mStr = str.getStr(); mStrLen = str.getStrLen(); }
Can all of these use initializer lists?
MessageString(s32 len, const char16_t* str) : mStr(str), mStrLen(len) {}
Code quote:
MessageString::MessageString(s32 len, const char16_t* str) {
mStr = str;
mStrLen = len;
}
MessageString::MessageString(const char16_t* str, const char16_t* str2) {
mStr = str;
mStrLen = (str2 - str);
}
MessageString::MessageString(const sead::SafeStringBase<char16_t>& str) {
mStr = str.cstr();
mStrLen = str.calcLength();
}
MessageString::MessageString(const MessageString& str) {
mStr = str.getStr();
mStrLen = str.getStrLen();
}src/message/euiMessageString.cpp line 57 at r1 (raw file):
mStr, size };
Suggestion:
return {
mStr,
sead::Mathi::clampMax(len, mStrLen)
};|
GLOB_RECURSE has proven to give issues with NEX as it doesn't recreate the file list on subprojects. |
I also added Globbing to the CMake Stuff.
I didn't impl that one function because I couldn't get it to match. If anybody has any idea then that would be great.
This change is