Skip to content

Silence inadvertently loud debug in TraceLine#66

Merged
drsteve merged 3 commits into
masterfrom
silence_adding_notifs
May 21, 2026
Merged

Silence inadvertently loud debug in TraceLine#66
drsteve merged 3 commits into
masterfrom
silence_adding_notifs

Conversation

@drsteve

@drsteve drsteve commented May 20, 2026

Copy link
Copy Markdown
Owner

TraceLine.c has different Lgm_TraceLine variants, and when used in the mode that adds a new point at exactly Bm there was some unhidden debug output (i.e., debug was never hit if AddBminPoint was FALSE).

This has now been changed to require a VerbosityLevel setting of 2 or higher in the input MagModelInfo structure.

Alongside this a number of formatting changes were made.

  • All tabs have been converted to spaces.
  • Numerous blank lines have been removed for readability
  • Some brackets and code alignment were set for readability

drsteve added 3 commits May 18, 2026 16:48
Commented lines were causing bracket mismatches in vim, and
the return when n>LGM_MAX_INTERP_PNTS was flagged by cpplint as
needing to be clearly disambiguated by bracketing the if flow on the
previous line.
Some blank white lines were removed for readability
@drsteve

drsteve commented May 20, 2026

Copy link
Copy Markdown
Owner Author

@JeffreyBroll @mghenderson64
Can you take a quick look at this? 1c6776f is the commit with the functional changes that hide the debug output. The other commits are just minimal cleanup to get cpplint shouting about a lot fewer lines.

@mghenderson64

mghenderson64 commented May 20, 2026 via email

Copy link
Copy Markdown
Contributor

@JeffreyBroll

Copy link
Copy Markdown

Looks good from here.
(1) is it time to have some cpplint turned on in CI as files get cleaned up?
(2) there's a lot of return(-1), a return(-2), and some return(-9...9.9)s. It might be worth filling out bits of an error-y enum before the zoo gets too interesting.

@drsteve

drsteve commented May 21, 2026

Copy link
Copy Markdown
Owner Author

is it time to have some cpplint turned on in CI as files get cleaned up?

Probably, but I have a stale branch somewhere that was deep into cleanup and it's a huge job, so initially almost every rule and file will be excluded

there's a lot of return(-1), a return(-2), and some return(-9...9.9)s. It might be worth filling out bits of an error-y enum before the zoo gets too interesting.

Believe it or not, I think this is actually better than it used to be. There is an LGM_FILL_VALUE that isn't as widely used as it should be, and there's been some updating of the return over the years to be more consistent. The big issue is making sure that we don't break behavior in the caller for any given return value. It's worth addressing and we should probably open an issue to keep it on the radar.

@drsteve
drsteve merged commit 90f046e into master May 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants