Skip to content

Commit

Permalink
fix compile error on NDK 21.x
Browse files Browse the repository at this point in the history
  • Loading branch information
lingol committed Nov 30, 2020
1 parent 69e4920 commit b722143
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions Core/MMKVLog_Android.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ using namespace std;

constexpr auto APP_NAME = "MMKV";

extern const char *_getFileName(const char *path);

static android_LogPriority MMKVLogLevelDesc(MMKVLogLevel level) {
switch (level) {
case MMKVLogDebug:
Expand All @@ -47,7 +45,7 @@ static android_LogPriority MMKVLogLevelDesc(MMKVLogLevel level) {
}
}

void _MMKVLogWithLevel(MMKVLogLevel level, const char *file, const char *func, int line, const char *format, ...) {
void _MMKVLogWithLevel(MMKVLogLevel level, const char *filename, const char *func, int line, const char *format, ...) {
if (level >= g_currentLogLevel) {
string message;
char buffer[16];
Expand All @@ -68,8 +66,6 @@ void _MMKVLogWithLevel(MMKVLogLevel level, const char *file, const char *func, i
va_end(args);
}

auto filename = _getFileName(file);

if (g_logHandler) {
g_logHandler(level, filename, line, func, message);
} else {
Expand Down

0 comments on commit b722143

Please sign in to comment.