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

Commit905c4bc

Browse files
committed
use explicit string comparison
1 parent38575e3 commit905c4bc

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

‎contrib/src/modem/db/get-command.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ bool GetCommand::execute(const String& command,
1616
String path = in->readLine();
1717
String value =fbase().getString(path);
1818

19-
if (fbase().error()) {
19+
if (fbase().error() !="") {
2020
out->print("-FAIL");
2121
out->println(fbase().error().c_str());
2222
returnfalse;

‎contrib/src/modem/db/push-command.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ bool PushCommand::execute(const String& command,
1919

2020
fbase().pushString(path, data);
2121

22-
if (fbase().error()) {
22+
if (fbase().error() !="") {
2323
out->print("-FAIL");
2424
out->println(fbase().error().c_str());
2525
returnfalse;

‎contrib/src/modem/db/remove-command.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ bool RemoveCommand::execute(const String& command,
1616
String path = in->readLine();
1717
fbase().remove(path);
1818

19-
if (fbase().error()) {
19+
if (fbase().error() !="") {
2020
out->print("-FAIL");
2121
out->println(fbase().error().c_str());
2222
returnfalse;

‎contrib/src/modem/db/set-command.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ bool SetCommand::execute(const String& command,
1919

2020
fbase().setString(path, data);
2121

22-
if (fbase().error()) {
22+
if (fbase().error() !="") {
2323
out->print("-FAIL");
2424
out->println(fbase().error().c_str());
2525
returnfalse;

‎contrib/src/modem/db/stream-command.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ bool StreamCommand::execute(const String& command,
1313
returnfalse;
1414
}
1515

16-
std::string path = in->readLine().c_str();
16+
String path = in->readLine().c_str();
1717
fbase().stream(path);
1818

19-
if (fbase().error()) {
19+
if (fbase().error() !="") {
2020
out->print("-FAIL");
2121
out->println(fbase().error().c_str());
2222
returnfalse;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp