Skip to content

Commit

Permalink
fixed empty() call
Browse files Browse the repository at this point in the history
  • Loading branch information
EmielBruijntjes committed Mar 16, 2014
1 parent 03a2749 commit 8e3653e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/call.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Value call(const char *name, Params&&... params)
*/
inline Value array_keys(const Value &value) { return call("array_keys", value); }
inline Value array_values(const Value &value) { return call("array_values", value); }
inline Value empty(const Value &value) { return call("empty", value); }
inline Value empty(const Value &value) { return value.isNull() || !value.boolValue(); }
inline Value empty(const HashMember<std::string> &member) { return !member.exists() || empty(member.value()); }
inline Value empty(const HashMember<int> &member) { return !member.exists() || empty(member.value()); }
//inline Value isset(const Value &value) { return call("isset", value); }
Expand Down

0 comments on commit 8e3653e

Please sign in to comment.