Skip to content

Type mismatch in TinyString::operator+=(int) - Declaration vs Implementation #8

@flohse123

Description

@flohse123

There is a type mismatch between the header declaration and the implementation of operator+= for integers in TinyString:

In TinyString.h (line 59):

TinyString& operator +=(int32_t);

In TinyString.cpp (line 75):

TinyString& TinyString::operator +=(int i)

This causes a compilation error:

error: no declaration matches 'TinyString& TinyString::operator+=(int)'

Fix:
Change line 75 in TinyString.cpp from:

TinyString& TinyString::operator +=(int i)

to:

TinyString& TinyString::operator +=(int32_t i)

Environment:

  • Platform: ESP32 (Arduino framework)
  • Compiler: xtensa-esp-elf-g++ 14.2.0

This simple type alignment fixes the compilation error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions