You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by bh...@apache.org on 2014/07/30 21:06:42 UTC

[25/38] git commit: BB10: Fix issues that getLocaleName return boolean instead of string value.

BB10: Fix issues that getLocaleName return boolean instead of string value.

* The reason is calling resultInJson(const char*) will be mapped to
  resultInJson(bool), instead of resultInJson(const std::string&).
* Adding an explicit resultInJson(const char*) fixes this issue.


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-globalization/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-globalization/commit/19eff2d9
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-globalization/tree/19eff2d9
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-globalization/diff/19eff2d9

Branch: refs/heads/lyon-g11n
Commit: 19eff2d9a002b35ce2b3019d9cfe8b07c8a183c1
Parents: 8994da3
Author: Lianghui Chen <li...@blackberry.com>
Authored: Mon Jul 28 15:31:34 2014 -0400
Committer: Lianghui Chen <li...@blackberry.com>
Committed: Mon Jul 28 15:31:34 2014 -0400

----------------------------------------------------------------------
 src/blackberry10/native/src/globalization_ndk.cpp | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-globalization/blob/19eff2d9/src/blackberry10/native/src/globalization_ndk.cpp
----------------------------------------------------------------------
diff --git a/src/blackberry10/native/src/globalization_ndk.cpp b/src/blackberry10/native/src/globalization_ndk.cpp
index 835696d..7b70d95 100644
--- a/src/blackberry10/native/src/globalization_ndk.cpp
+++ b/src/blackberry10/native/src/globalization_ndk.cpp
@@ -60,6 +60,13 @@ std::string resultInJson(const std::string& value)
     return writer.write(root);
 }
 
+// This is needed so resultInJson(const char*) will not be called into
+// resultInJson(bool) implicitly.
+static inline std::string resultInJson(const char* value)
+{
+    return resultInJson(std::string(value));
+}
+
 std::string resultInJson(bool value)
 {
     Json::Value root;