From 22abf1635109bdaf887c9bc570670f69413e2902 Mon Sep 17 00:00:00 2001 From: Jeff Genovy <29107334+jefgen@users.noreply.github.com> Date: Wed, 8 Aug 2018 11:38:28 -0700 Subject: [PATCH] ICU-13814 Fix define for excluding renaming from VS IntelliSense, so F12 works. (#22) In the prior change for this ticket the logic was mixed up. For IntelliSense we actually want to turn *off* the renaming defines so that VS doesn't get confused when you press F12. --- icu4c/source/common/unicode/urename.h | 4 ++-- icu4c/source/tools/genren/genren.pl | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/icu4c/source/common/unicode/urename.h b/icu4c/source/common/unicode/urename.h index 523fcc1523a..6d5f8ae39c3 100644 --- a/icu4c/source/common/unicode/urename.h +++ b/icu4c/source/common/unicode/urename.h @@ -34,7 +34,7 @@ #if !U_DISABLE_RENAMING // Disable Renaming for Visual Studio's IntelliSense feature, so that 'Go-to-Definition' (F12) will work. -#if defined(_MSC_VER) && defined(__INTELLISENSE__) +#if defined(_MSC_VER) && !defined(__INTELLISENSE__) /* We need the U_ICU_ENTRY_POINT_RENAME definition. There's a default one in unicode/uvernum.h we can use, but we will give the platform a chance to define it first. @@ -1830,7 +1830,7 @@ #define ztrans_setTime U_ICU_ENTRY_POINT_RENAME(ztrans_setTime) #define ztrans_setTo U_ICU_ENTRY_POINT_RENAME(ztrans_setTo) -#endif /* defined(_MSC_VER) && defined(__INTELLISENSE__) */ +#endif /* defined(_MSC_VER) && !defined(__INTELLISENSE__) */ #endif /* U_DISABLE_RENAMING */ diff --git a/icu4c/source/tools/genren/genren.pl b/icu4c/source/tools/genren/genren.pl index d9a6d88a5d6..76f8c0f392b 100755 --- a/icu4c/source/tools/genren/genren.pl +++ b/icu4c/source/tools/genren/genren.pl @@ -107,7 +107,7 @@ print HEADER <<"EndOfHeaderComment"; #if !U_DISABLE_RENAMING // Disable Renaming for Visual Studio's IntelliSense feature, so that 'Go-to-Definition' (F12) will work. -#if defined(_MSC_VER) && defined(__INTELLISENSE__) +#if defined(_MSC_VER) && !defined(__INTELLISENSE__) /* We need the U_ICU_ENTRY_POINT_RENAME definition. There's a default one in unicode/uvernum.h we can use, but we will give the platform a chance to define it first. @@ -242,7 +242,7 @@ foreach(sort keys(%CFuncs)) { print HEADER <<"EndOfHeaderFooter"; -#endif /* defined(_MSC_VER) && defined(__INTELLISENSE__) */ +#endif /* defined(_MSC_VER) && !defined(__INTELLISENSE__) */ #endif /* U_DISABLE_RENAMING */ #endif /* URENAME_H */