Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an Fw::ObjectName implementation of Fw::StringBase #2493

Closed
bocchino opened this issue Jan 18, 2024 · 0 comments
Closed

Add an Fw::ObjectName implementation of Fw::StringBase #2493

bocchino opened this issue Jan 18, 2024 · 0 comments
Assignees

Comments

@bocchino
Copy link
Collaborator

This way we can replace the char array here

char m_objName[FW_OBJ_NAME_MAX_SIZE]; //!< stores object name

with an Fw::ObjectName object. That will have the following benefits:

  1. Avoid direct use of bare string arrays and snprintf.
  2. Avoid creating temporary string buffers on the stack to copy strings into the object name.
  3. Avoid compiler string truncation warnings. See Increase size of temporary buffer in C++ code gen fpp#383.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants