Skip to content

Commit 7cf2832

Browse files
Merge pull request #4389 from JohnAFernandez/Remove-pointless-Asserts
Remove a pointless assert
2 parents 6f5de69 + b3f0016 commit 7cf2832

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

code/parse/sexp.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -871,7 +871,10 @@ int Training_context_goal_waypoint;
871871
int Training_context_at_waypoint;
872872
float Training_context_distance;
873873

874+
// If you edit this, make sure this is greater than zero,
875+
// so that we don't have to write pointless asserts. :)
874876
#define SEXP_NODE_INCREMENT 250
877+
875878
int Num_sexp_nodes = 0;
876879
sexp_node *Sexp_nodes = nullptr;
877880

@@ -1247,8 +1250,6 @@ int alloc_sexp(const char *text, int type, int subtype, int first, int rest)
12471250
{
12481251
int old_size = Num_sexp_nodes;
12491252

1250-
Assert(SEXP_NODE_INCREMENT > 0);
1251-
12521253
// allocate in blocks of SEXP_NODE_INCREMENT
12531254
Num_sexp_nodes += SEXP_NODE_INCREMENT;
12541255
Sexp_nodes = (sexp_node *) vm_realloc(Sexp_nodes, sizeof(sexp_node) * Num_sexp_nodes);

0 commit comments

Comments
 (0)