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

Commit2ba6fea

Browse files
committed
Remove const char* methods
1 parent73fcfeb commit2ba6fea

File tree

2 files changed

+0
-30
lines changed

2 files changed

+0
-30
lines changed

‎src/FirebaseArduino.cpp‎

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,13 @@
1616

1717
#include"FirebaseArduino.h"
1818

19-
voidFirebaseArduino::begin(constchar* host,constchar* auth) {
20-
begin(String(host),String(auth));
21-
}
22-
2319
voidFirebaseArduino::begin(const String& host,const String& auth) {
2420
http_.reset(FirebaseHttpClient::create());
2521
http_->setReuseConnection(true);
2622
host_ = host;
2723
auth_ = auth;
2824
}
2925

30-
StringFirebaseArduino::FirebaseArduino::push(constchar* path,const JsonVariant& value) {
31-
returnpush(String(path), value);
32-
}
33-
3426
StringFirebaseArduino::FirebaseArduino::push(const String& path,const JsonVariant& value) {
3527
String buf;
3628
value.printTo(buf);
@@ -39,21 +31,13 @@ String FirebaseArduino::FirebaseArduino::push(const String& path, const JsonVari
3931
return push.name();
4032
}
4133

42-
voidFirebaseArduino::set(constchar* path,const JsonVariant& value) {
43-
set(String(path), value);
44-
}
45-
4634
voidFirebaseArduino::set(const String& path,const JsonVariant& value) {
4735
String buf;
4836
value.printTo(buf);
4937
auto set =FirebaseSet(host_, auth_, path, buf, http_.get());
5038
error_ = set.error();
5139
}
5240

53-
FirebaseObjectFirebaseArduino::get(constchar* path) {
54-
returnget(String(path));
55-
}
56-
5741
FirebaseObjectFirebaseArduino::get(const String& path) {
5842
auto get =FirebaseGet(host_, auth_, path, http_.get());
5943
error_ = get.error();
@@ -63,19 +47,11 @@ FirebaseObject FirebaseArduino::get(const String& path) {
6347
returnFirebaseObject(get.response());
6448
}
6549

66-
voidFirebaseArduino::remove(constchar* path) {
67-
remove(String(path));
68-
}
69-
7050
voidFirebaseArduino::remove(const String& path) {
7151
auto remove =FirebaseRemove(host_, auth_, path, http_.get());
7252
error_ = remove.error();
7353
}
7454

75-
voidFirebaseArduino::stream(constchar* path) {
76-
stream(String(path));
77-
}
78-
7955
voidFirebaseArduino::stream(const String& path) {
8056
auto stream =FirebaseStream(host_, auth_, path, http_.get());
8157
error_ = stream.error();

‎src/FirebaseArduino.h‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ class FirebaseArduino {
3535
* \param host Your firebase db host, usually X.firebaseio.com.
3636
* \param auth Optional credentials for the db, a secret or token.
3737
*/
38-
voidbegin(constchar* host,constchar* auth ="");
3938
voidbegin(const String& host,const String& auth ="");
4039

4140
/**
@@ -46,7 +45,6 @@ class FirebaseArduino {
4645
* \param value Data that you wish to add under the parent.
4746
* \return The unique child key where the data was written.
4847
*/
49-
Stringpush(constchar* path,const JsonVariant& value);
5048
Stringpush(const String& path,const JsonVariant& value);
5149

5250
/**
@@ -56,7 +54,6 @@ class FirebaseArduino {
5654
* \param path The path inside of your db to the node you wish to update.
5755
* \param value Data that you wish to write.
5856
*/
59-
voidset(constchar* path,const JsonVariant& value);
6057
voidset(const String& path,const JsonVariant& value);
6158

6259

@@ -67,7 +64,6 @@ class FirebaseArduino {
6764
* \return The data located at that path. This may either be a single element
6865
* or it may be a json structure. Will only be populated if success() is true.
6966
*/
70-
FirebaseObjectget(constchar* path);
7167
FirebaseObjectget(const String& path);
7268

7369
/**
@@ -76,7 +72,6 @@ class FirebaseArduino {
7672
* \param path The path to the node you wish to remove,
7773
* including all of its children.
7874
*/
79-
voidremove(constchar* path);
8075
voidremove(const String& path);
8176

8277
/**
@@ -87,7 +82,6 @@ class FirebaseArduino {
8782
* monitoring available() and calling readEvent() to get new events.
8883
* \param path The path inside of your db to the node you wish to monitor.
8984
*/
90-
voidstream(constchar* path);
9185
voidstream(const String& path);
9286

9387
/**

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp