[common] Add Arduino emptyString declaration
This commit is contained in:
@@ -51,7 +51,7 @@ def env_add_core_sources(env: Environment, queue, name: str, path: str) -> bool:
|
|||||||
"+<compat/*.c*>",
|
"+<compat/*.c*>",
|
||||||
"+<port/*.c*>",
|
"+<port/*.c*>",
|
||||||
"+<posix/*.c>",
|
"+<posix/*.c>",
|
||||||
"+<wiring/*.c>",
|
"+<wiring/*.c*>",
|
||||||
"+<wraps/*.c>",
|
"+<wraps/*.c>",
|
||||||
],
|
],
|
||||||
includes=[
|
includes=[
|
||||||
|
|||||||
@@ -7,3 +7,6 @@ String ipToString(const IPAddress &ip) {
|
|||||||
sprintf(szRet, "%hhu.%hhu.%hhu.%hhu", ip[0], ip[1], ip[2], ip[3]);
|
sprintf(szRet, "%hhu.%hhu.%hhu.%hhu", ip[0], ip[1], ip[2], ip[3]);
|
||||||
return String(szRet);
|
return String(szRet);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// global empty string to allow returning const String& with nothing
|
||||||
|
const String emptyString;
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ extern "C" {
|
|||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
String ipToString(const IPAddress &ip);
|
String ipToString(const IPAddress &ip);
|
||||||
|
extern const String emptyString;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|||||||
Reference in New Issue
Block a user