xiaoyifang / goldendict-ng

The Next Generation GoldenDict
https://xiaoyifang.github.io/goldendict-ng/
Other
1.71k stars 95 forks source link

clean: delete `stub_msvc.h` #1970

Closed shenlebantongying closed 2 days ago

shenlebantongying commented 2 days ago

strcasecmp is not standard C, it is defined by POSIX.

(The actual implementation is just looping through chars and do tolower https://github.com/bminor/glibc/blob/master/string/strcasecmp.c )

Replace them with QByteArrayView which doesn't own the memory, and it is pretty feature rich (than std::string_view).

Let's simply take a "view" and do the comparisons (which invokes lower level C functions, but with a prettier interface).

(I find the result code is quite readable, btw.)

sonarcloud[bot] commented 2 days ago

Quality Gate Passed Quality Gate passed

Issues
2 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

shenlebantongying commented 2 days ago

amended by https://github.com/xiaoyifang/goldendict-ng/pull/1971