Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
SRB2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
William Vue
SRB2
Commits
4713b258
Commit
4713b258
authored
4 years ago
by
James R.
Browse files
Options
Downloads
Patches
Plain Diff
Bit array conflicts
parent
353692fa
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/lua_hooklib.c
+1
-13
1 addition, 13 deletions
src/lua_hooklib.c
with
1 addition
and
13 deletions
src/lua_hooklib.c
+
1
−
13
View file @
4713b258
...
...
@@ -38,18 +38,6 @@ static const char * const stringHookNames[] = {
STRING_HOOK_LIST
(
TOSTR
)
NULL
};
/* TODO: remove when doomtype version is merged */
#define BIT_ARRAY_LENGTH(n) (((n) + 7) >> 3)
static
inline
void
set_bit_array
(
UINT8
*
array
,
const
int
n
)
{
array
[
n
>>
3
]
|=
1
<<
(
n
&
7
);
}
static
inline
int
in_bit_array
(
const
UINT8
*
array
,
const
int
n
)
{
return
array
[
n
>>
3
]
&
(
1
<<
(
n
&
7
));
}
typedef
struct
{
int
numHooks
;
int
*
ids
;
...
...
@@ -215,7 +203,7 @@ static int lib_addHook(lua_State *L)
if
(
!
(
nextid
&
7
))
{
Z_Realloc
(
hooksErrored
,
BIT_ARRAY_
LENGTH
(
nextid
+
1
)
*
sizeof
*
hooksErrored
,
BIT_ARRAY_
SIZE
(
nextid
+
1
)
*
sizeof
*
hooksErrored
,
PU_STATIC
,
&
hooksErrored
);
hooksErrored
[
nextid
>>
3
]
=
0
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment