Przeglądaj źródła

potential fix for MSVC compile error

pull/4807/head
Rico P 3 dni temu
committed by GitHub
rodzic
commit
7dc409d060
Nie znaleziono w bazie danych klucza dla tego podpisu ID klucza GPG: B5690EEEBB952194
1 zmienionych plików z 3 dodań i 3 usunięć
  1. +3
    -3
      src/external/sinfl.h

+ 3
- 3
src/external/sinfl.h Wyświetl plik

@ -172,9 +172,9 @@ extern int zsinflate(void *out, int cap, const void *in, int size);
static int
sinfl_bsr(unsigned n) {
#ifdef _MSC_VER
unsigned long r = 0;
_BitScanReverse(&r, n);
return int(r);
unsigned long uln = 0;
_BitScanReverse(&uln, n);
return int(uln);
#else // defined(__GNUC__) || defined(__clang__) || defined(__TINYC__)
return 31 - __builtin_clz(n);
#endif

Ładowanie…
Anuluj
Zapisz