Migrate SK_strcasecmp to SkStringUtils.h.
This will let us use it elsewhere. Change-Id: I39a5dc0651bee8fbd5fa7302e34a3a79f7efbd3d Reviewed-on: https://skia-review.googlesource.com/c/skia/+/481736 Commit-Queue: John Stiles <johnstiles@google.com> Auto-Submit: John Stiles <johnstiles@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
This commit is contained in:
parent
0ee3e0c959
commit
bc5b9f6b53
@ -367,6 +367,7 @@ skia_core_sources = [
|
||||
"$_src/core/SkStrikeSpec.h",
|
||||
"$_src/core/SkString.cpp",
|
||||
"$_src/core/SkStringUtils.cpp",
|
||||
"$_src/core/SkStringUtils.h",
|
||||
"$_src/core/SkStringView.cpp",
|
||||
"$_src/core/SkStroke.cpp",
|
||||
"$_src/core/SkStroke.h",
|
||||
|
@ -32,4 +32,10 @@ SkString SkTabString(const SkString& string, int tabCnt);
|
||||
|
||||
SkString SkStringFromUTF16(const uint16_t* src, size_t count);
|
||||
|
||||
#if defined(SK_BUILD_FOR_WIN)
|
||||
#define SK_strcasecmp _stricmp
|
||||
#else
|
||||
#define SK_strcasecmp strcasecmp
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -9,6 +9,7 @@
|
||||
|
||||
#include "include/core/SkCanvas.h"
|
||||
#include "include/core/SkFont.h"
|
||||
#include "src/core/SkStringUtils.h"
|
||||
|
||||
namespace sk_app {
|
||||
|
||||
@ -78,12 +79,6 @@ void CommandSet::addCommand(skui::Key k, const char* keyName, const char* group,
|
||||
fCommands.push_back(Command(k, keyName, group, description, function));
|
||||
}
|
||||
|
||||
#if defined(SK_BUILD_FOR_WIN)
|
||||
#define SK_strcasecmp _stricmp
|
||||
#else
|
||||
#define SK_strcasecmp strcasecmp
|
||||
#endif
|
||||
|
||||
bool CommandSet::compareCommandKey(const Command& first, const Command& second) {
|
||||
return SK_strcasecmp(first.fKeyName.c_str(), second.fKeyName.c_str()) < 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user