Skip to content

Commit

Permalink
chore: silent a warning on integer type conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
lotem committed Jan 30, 2021
1 parent 8caeb34 commit 25d005d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 23 deletions.
2 changes: 1 addition & 1 deletion macos_keycode.h
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@

// conversion functions

int osx_modifiers_to_rime_modifiers(unsigned modifiers);
int osx_modifiers_to_rime_modifiers(unsigned long modifiers);
int osx_keycode_to_rime_keycode(int keycode, int keychar, int shift, int caps);


Expand Down
2 changes: 1 addition & 1 deletion macos_keycode.m
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#import <rime/key_table.h>


int osx_modifiers_to_rime_modifiers(unsigned modifiers)
int osx_modifiers_to_rime_modifiers(unsigned long modifiers)
{
int ret = 0;

Expand Down
13 changes: 2 additions & 11 deletions utf8.cpp
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
/*
* utf8.cpp
* Squirrel
*
* Created by 弓辰 on 2011/12/31.
* Copyright 2011 __MyCompanyName__. All rights reserved.
*
*/

#include "utf8.h"
#include "utf8/unchecked.h"


unsigned utf8len(const char *text, unsigned octet_len) {
unsigned long utf8len(const char *text, unsigned octet_len) {
return utf8::unchecked::distance(text, text + octet_len);
}
}
11 changes: 1 addition & 10 deletions utf8.h
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
/*
* utf8.h
* Squirrel
*
* Created by 弓辰 on 2011/12/31.
* Copyright 2011 __MyCompanyName__. All rights reserved.
*
*/

#if defined(__cplusplus)
#define UTF8_API extern "C"
#else
#define UTF8_API
#endif

UTF8_API unsigned utf8len(const char *text, unsigned octet_len);
UTF8_API unsigned long utf8len(const char *text, unsigned octet_len);

0 comments on commit 25d005d

Please sign in to comment.