Skip to content

Commit f85e81e

Browse files
committed
Switch to optimized ffsl supported on more platforms
In file included from Source/GmmLib/TranslationTable/GmmAuxTable.cpp:30: Source/GmmLib/TranslationTable/../TranslationTable/GmmUmdTranslationTable.h: In function ‘int _BitScanForward(uint32_t*, uint32_t)’: Source/GmmLib/TranslationTable/../TranslationTable/GmmUmdTranslationTable.h:63:9: error: ‘ffsl’ was not declared in this scope i = ffsl(mask); ^~~~ Source/GmmLib/TranslationTable/../TranslationTable/GmmUmdTranslationTable.h:63:9: note: suggested alternative: ‘ffs’ i = ffsl(mask); ^~~~ ffs
1 parent 366e17b commit f85e81e

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

Source/GmmLib/TranslationTable/GmmUmdTranslationTable.h

+1-6
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,7 @@ static inline int _BitScanForward(uint32_t *index, uint32_t mask)
6060
{
6161
int i;
6262

63-
#ifdef __ANDROID__
64-
i = ffs(mask);
65-
#else
66-
i = ffsl(mask);
67-
#endif
68-
63+
i = __builtin_ffsl(mask);
6964
if(i > 0)
7065
{
7166
*index = (uint32_t)(i - 1);

0 commit comments

Comments
 (0)