diff options
author | Tom Cherry <tomcherry@google.com> | 2019-01-15 18:22:37 -0800 |
---|---|---|
committer | Tom Cherry <tomcherry@google.com> | 2019-01-15 20:49:06 -0800 |
commit | e5b615076b0598e6043de9f90c0e9f8c21bbaa52 (patch) | |
tree | d2af18eae7fa9e8054be58ccf494cc582c1f7a5a /liblog/include | |
parent | dea312bf1422d8df81e476f4a851dc640125ba86 (diff) | |
download | system_core-e5b615076b0598e6043de9f90c0e9f8c21bbaa52.tar.gz system_core-e5b615076b0598e6043de9f90c0e9f8c21bbaa52.tar.bz2 system_core-e5b615076b0598e6043de9f90c0e9f8c21bbaa52.zip |
Remove checks for _USING_LIBCXX
__cplusplus is enough
Test: build
Change-Id: Ia0cf3b5beafe41ae1ce17335b5b06c753e665a32
Diffstat (limited to 'liblog/include')
-rw-r--r-- | liblog/include/log/log_event_list.h | 8 | ||||
-rw-r--r-- | liblog/include/private/android_logger.h | 6 |
2 files changed, 2 insertions, 12 deletions
diff --git a/liblog/include/log/log_event_list.h b/liblog/include/log/log_event_list.h index 1b7c37717..8f7c421f4 100644 --- a/liblog/include/log/log_event_list.h +++ b/liblog/include/log/log_event_list.h @@ -20,10 +20,8 @@ #include <errno.h> #include <stdint.h> -#if (defined(__cplusplus) && defined(_USING_LIBCXX)) -extern "C++" { +#ifdef __cplusplus #include <string> -} #endif #include <log/log.h> @@ -208,14 +206,12 @@ class android_log_event_list { return *this; } -#if defined(_USING_LIBCXX) android_log_event_list& operator<<(const std::string& value) { int retval = android_log_write_string8_len(ctx, value.data(), value.length()); if (retval < 0) ret = retval; return *this; } -#endif android_log_event_list& operator<<(float value) { int retval = android_log_write_float32(ctx, value); @@ -269,7 +265,6 @@ class android_log_event_list { return ret >= 0; } -#if defined(_USING_LIBCXX) bool AppendString(const std::string& value) { int retval = android_log_write_string8_len(ctx, value.data(), value.length()); @@ -283,7 +278,6 @@ class android_log_event_list { if (retval < 0) ret = retval; return ret; } -#endif bool AppendFloat(float value) { int retval = android_log_write_float32(ctx, value); diff --git a/liblog/include/private/android_logger.h b/liblog/include/private/android_logger.h index b927b4677..9da20a65b 100644 --- a/liblog/include/private/android_logger.h +++ b/liblog/include/private/android_logger.h @@ -25,10 +25,8 @@ #include <stdint.h> #include <sys/types.h> -#if (defined(__cplusplus) && defined(_USING_LIBCXX)) -extern "C++" { +#ifdef __cplusplus #include <string> -} #endif #include <log/log.h> @@ -170,7 +168,6 @@ class __android_log_event_list : public android_log_event_list { : android_log_event_list(log_msg) { } -#if defined(_USING_LIBCXX) operator std::string() { if (ret) return std::string(""); const char* cp = nullptr; @@ -179,7 +176,6 @@ class __android_log_event_list : public android_log_event_list { if (!cp || (len <= 0)) return std::string(""); return std::string(cp, len); } -#endif }; } #endif |