From 471c0898727f91d7e5db68f7ea61520611c40fbb Mon Sep 17 00:00:00 2001 From: Karthik Bhat Date: Wed, 11 Mar 2020 11:30:45 +0530 Subject: [PATCH] Remove undefined behavior code to build with llvm-10 Change-Id: I89986c72ad34db6cc9ac46c79d086dd8cde7379f Signed-off-by: Karthik Bhat --- ucl/include/ucl/gui/Atspi.h | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/ucl/include/ucl/gui/Atspi.h b/ucl/include/ucl/gui/Atspi.h index 56a0bf8..7427ddf 100644 --- a/ucl/include/ucl/gui/Atspi.h +++ b/ucl/include/ucl/gui/Atspi.h @@ -236,23 +236,11 @@ namespace ucl { */ template inline auto as_ao(const T &ptr) -> typename std::enable_if< - std::is_constructible::value, decltype(as_ao(*ptr))>::type + true, decltype(as_ao(*ptr))>::type { return (ptr ? as_ao(*ptr) : nullptr); } - /** - * @brief Gets Access object from iterator - * @param[in] it Target object iterator - * @return Pointer to Access object or NULL - */ - template - inline auto as_ao(const T &it) -> typename std::enable_if< - !std::is_constructible::value, decltype(as_ao(*it))>::type - { - return as_ao(*it); - } - /** * @brief Passes through original Access object pointer * @param[in] ao Access object pointer -- 2.34.1