Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2ef168c

Browse files
committed
Switched new methods to const String&
1 parent59f773c commit2ef168c

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

‎src/FirebaseArduino.cpp‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ FirebaseObject FirebaseArduino::get(const String& path) {
4747
returnFirebaseObject(get.response());
4848
}
4949

50-
intFirebaseArduino::getInt(constchar* path) {
50+
intFirebaseArduino::getInt(constString& path) {
5151
auto get =FirebaseGet(host_, auth_, path, http_.get());
5252
error_ = get.error();
5353
if (failed()) {
@@ -57,7 +57,7 @@ int FirebaseArduino::getInt(const char* path) {
5757
}
5858

5959

60-
floatFirebaseArduino::getFloat(constchar* path) {
60+
floatFirebaseArduino::getFloat(constString& path) {
6161
auto get =FirebaseGet(host_, auth_, path, http_.get());
6262
error_ = get.error();
6363
if (failed()) {
@@ -66,7 +66,7 @@ float FirebaseArduino::getFloat(const char* path) {
6666
returnFirebaseObject(get.response()).getFloat();
6767
}
6868

69-
StringFirebaseArduino::getString(constchar* path) {
69+
StringFirebaseArduino::getString(constString& path) {
7070
auto get =FirebaseGet(host_, auth_, path, http_.get());
7171
error_ = get.error();
7272
if (failed()) {
@@ -75,7 +75,7 @@ String FirebaseArduino::getString(const char* path) {
7575
returnFirebaseObject(get.response()).getString();
7676
}
7777

78-
boolFirebaseArduino::getBool(constchar* path) {
78+
boolFirebaseArduino::getBool(constString& path) {
7979
auto get =FirebaseGet(host_, auth_, path, http_.get());
8080
error_ = get.error();
8181
if (failed()) {

‎src/FirebaseArduino.h‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,31 +63,31 @@ class FirebaseArduino {
6363
* \param path The path to the node you wish to retrieve.
6464
* \return The integer value located at that path. Will only be populated if success() is true.
6565
*/
66-
intgetInt(constchar* path);
66+
intgetInt(constString& path);
6767

6868
/**
6969
* Gets the float value located at path.
7070
* You should check success() after calling.
7171
* \param path The path to the node you wish to retrieve.
7272
* \return The float value located at that path. Will only be populated if success() is true.
7373
*/
74-
floatgetFloat(constchar* path);
74+
floatgetFloat(constString& path);
7575

7676
/**
7777
* Gets the string value located at path.
7878
* You should check success() after calling.
7979
* \param path The path to the node you wish to retrieve.
8080
* \return The string value located at that path. Will only be populated if success() is true.
8181
*/
82-
StringgetString(constchar* path);
82+
StringgetString(constString& path);
8383

8484
/**
8585
* Gets the boolean value located at path.
8686
* You should check success() after calling.
8787
* \param path The path to the node you wish to retrieve.
8888
* \return The boolean value located at that path. Will only be populated if success() is true.
8989
*/
90-
boolgetBool(constchar* path);
90+
boolgetBool(constString& path);
9191

9292
/**
9393
* Gets the json object value located at path.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp