(svn r27755) -Codechange: Move TAB_SIZE to strings_type.h and use it consistently.

This commit is contained in:
frosch
2017-02-26 19:40:32 +00:00
parent 9ad09627ad
commit f4da8ece0c
4 changed files with 13 additions and 9 deletions

View File

@@ -24,7 +24,7 @@
*/
static inline uint GetStringTab(StringID str)
{
return GB(str, 11, 5);
return GB(str, TAB_SIZE_BITS, 5);
}
/**
@@ -34,7 +34,7 @@ static inline uint GetStringTab(StringID str)
*/
static inline uint GetStringIndex(StringID str)
{
return GB(str, 0, 11);
return GB(str, 0, TAB_SIZE_BITS);
}
/**
@@ -45,7 +45,8 @@ static inline uint GetStringIndex(StringID str)
*/
static inline StringID MakeStringID(uint tab, uint index)
{
return tab << 11 | index;
assert(index < TAB_SIZE);
return tab << TAB_SIZE_BITS | index;
}
class StringParameters {