mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
Remove compilation warnings
This commit is contained in:
@@ -179,8 +179,8 @@ void generateImplementationFromImage(FILE * file, const char * header, const cha
|
||||
int maxSizeOfCompressedPixelBuffer = LZ4_compressBound(sizeOfPixelBuffer);
|
||||
uint8_t * compressedPixelBuffer = malloc(maxSizeOfCompressedPixelBuffer);
|
||||
int sizeOfCompressedPixelBuffer = LZ4_compress_HC(
|
||||
pixelBuffer,
|
||||
compressedPixelBuffer,
|
||||
(const char *)pixelBuffer,
|
||||
(char *)compressedPixelBuffer,
|
||||
sizeOfPixelBuffer,
|
||||
maxSizeOfCompressedPixelBuffer,
|
||||
LZ4HC_CLEVEL_MAX
|
||||
|
||||
@@ -171,11 +171,12 @@ bool TextField::ContentView::removeCodePoint() {
|
||||
|
||||
bool TextField::ContentView::removeEndOfLine() {
|
||||
assert(m_isEditing);
|
||||
if (m_currentDraftTextLength == cursorLocation() - m_draftTextBuffer) {
|
||||
size_t lengthToCursor = (size_t)(cursorLocation() - m_draftTextBuffer);
|
||||
if (m_currentDraftTextLength == lengthToCursor) {
|
||||
return false;
|
||||
}
|
||||
reloadRectFromPosition(m_horizontalAlignment == 0.0f ? cursorLocation() : m_draftTextBuffer);
|
||||
m_currentDraftTextLength = cursorLocation() - m_draftTextBuffer;
|
||||
m_currentDraftTextLength = lengthToCursor;
|
||||
*(const_cast<char *>(cursorLocation())) = 0;
|
||||
layoutSubviews();
|
||||
return true;
|
||||
|
||||
@@ -28,7 +28,7 @@ public:
|
||||
CodePoint previousCodePoint();
|
||||
const char * stringPosition() const { return m_stringPosition; }
|
||||
static size_t CharSizeOfCodePoint(CodePoint c);
|
||||
static size_t CodePointToChars(CodePoint c, char * buffer, int bufferSize);
|
||||
static size_t CodePointToChars(CodePoint c, char * buffer, size_t bufferSize);
|
||||
private:
|
||||
const char * const m_string;
|
||||
const char * m_stringPosition;
|
||||
|
||||
@@ -9,6 +9,7 @@ static inline int leading_ones(uint8_t value) {
|
||||
value = value << 1;
|
||||
}
|
||||
assert(false);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline uint8_t last_k_bits(uint8_t value, uint8_t bits) {
|
||||
@@ -68,7 +69,7 @@ size_t UTF8Decoder::CharSizeOfCodePoint(CodePoint c) {
|
||||
return 4;
|
||||
}
|
||||
|
||||
size_t UTF8Decoder::CodePointToChars(CodePoint c, char * buffer, int bufferSize) {
|
||||
size_t UTF8Decoder::CodePointToChars(CodePoint c, char * buffer, size_t bufferSize) {
|
||||
if (bufferSize <= 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user