Skip to content

Conversation

@Goober5000
Copy link
Contributor

Small refactoring of the debug filter, needed as a prerequisite for #4448.

Small refactoring of the debug filter, needed as a prerequisite for scp-fs2open#4448.
@Goober5000 Goober5000 added the enhancement A new feature or upgrade of an existing feature to add additional functionality. label Jun 28, 2022
@Goober5000 Goober5000 added this to the Release 22.2 milestone Jun 28, 2022
Copy link
Contributor

@notimaginative notimaginative left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor thing that you can address, or not, but otherwise it LGTM.

Outwnd_no_filter_file = 0;

while ( fgets(inbuf, NAME_LENGTH+3, fp) ) {
bool enabled;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although I think the continue statement below would take care of it, valgrind might throw a warning about this variable not being initialized. It might be nice to just initialize this to false and not have to worry about it again.

But valgrind should be smart enough to not flag this, so I'll leave it up to you whether or not to make the change.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The if() block below looks "neater" with the variable the way it is, so I prefer it as is. I'll give valgrind the benefit of the doubt, and cross that bridge if we come to it.

@Goober5000 Goober5000 merged commit 5dfef48 into scp-fs2open:master Jun 28, 2022
@Goober5000 Goober5000 deleted the default_enabled_nprintf_categories branch June 28, 2022 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement A new feature or upgrade of an existing feature to add additional functionality.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants