Skip to content
This repository was archived by the owner on Mar 17, 2025. It is now read-only.

Conversation

@ed7coyne
Copy link
Collaborator

@ed7coyne ed7coyne commented May 26, 2016

I think copying is kept reasonable. .c_str() will return a pointer to internal state according to c++11 spec. Assuming it is similar on Arduino String.
Addresses #117


void FirebaseArduino::setString(const String& path, const String& value) {
JsonVariant json(value);
JsonVariant json(value.c_str());
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one is odd because it is a pre-existing bug. If you pass JasonVariant an Arduino String it will always interpret it as bool (at least it does for the string in FirebaseDemo).


// update value
Firebase.setFloat("number", 43.0);
// handle error
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we should split that in a different PR?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Split this one out.

@ed7coyne ed7coyne merged commit 1dc1ccd into FirebaseExtended:master Jun 3, 2016
@ed7coyne ed7coyne deleted the remove-arduino-string branch June 17, 2016 16:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants