MCPcopy Create free account
hub / github.com/FastLED/FastLED / _insert_noexcept_at

Function _insert_noexcept_at

ci/lint_cpp/noexcept_special_members_checker.py:373–384  ·  view source on GitHub ↗

Insert ' FL_NOEXCEPT' immediately after ')' at *close_paren_col*.

(line: str, close_paren_col: int)

Source from the content-addressed store, hash-verified

371
372
373def _insert_noexcept_at(line: str, close_paren_col: int) -> str:
374 """Insert ' FL_NOEXCEPT' immediately after ')' at *close_paren_col*."""
375 before = line[: close_paren_col + 1]
376 after = line[close_paren_col + 1 :]
377 # No trailing space needed when followed by ; or { directly
378 if not after or after[0] in (";", "{"):
379 return before + " FL_NOEXCEPT" + after
380 # Already has a space → insert keyword before existing space
381 if after[0] == " ":
382 return before + " FL_NOEXCEPT" + after
383 # Otherwise add a space after
384 return before + " FL_NOEXCEPT " + after
385
386
387def _ensure_include(content: str) -> str:

Callers 1

fix_fileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected