1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-02-03 03:30:06 +00:00
JUCE/modules/juce_core/text
brothatza f6e728e878 juce_core: guard juce_NewLine.h with #pragma once to prevent MSVC redefinition
On Windows/MSVC, our amalgamated build path can see juce_NewLine.h twice (via juce_core.cpp and juce_String.cpp), causing duplicate definitions of juce::NewLine and related operators (C2011/C2084). This breaks clean debug builds and can block launching.

Change
- Add `#pragma once` at the start of `text/juce_NewLine.h`.

Rationale
- Consistent with other JUCE headers using single-include guards.
- No ABI/runtime behavior change; header-only fix.
- MSVC/Clang/GCC all support `#pragma once`.

Impact
- Fixes duplicate definition errors on MSVC.
- Unblocks stable Debug/Release builds of the VST3/Standalone targets.

Tested
- VS 2022 Build Tools 17.14, MSVC 19.44
- CMake 4.1.1
- Builds: vs2022-debug-out, vs2022-release-out
- Targets: Standalone + VST3

Risk
- Minimal; compile-time only.

Upstream-Status
- Local vendor patch; suitable for an upstream PR if maintainers prefer a traditional include guard.
2025-09-13 13:33:48 -05:00
..
juce_Base64.cpp Update licensing information 2024-04-16 11:39:35 +01:00
juce_Base64.h Update licensing information 2024-04-16 11:39:35 +01:00
juce_CharacterFunctions.cpp MinGW: Remove support 2024-06-27 18:10:21 +01:00
juce_CharacterFunctions.h Docs: Replace doxygen preprocessor conditionals with @cond and @endconds 2025-07-21 18:11:43 +02:00
juce_CharPointer_ASCII.h Text: Improve string validation 2024-09-06 15:40:39 +00:00
juce_CharPointer_UTF8.h Text: Improve string validation 2024-09-06 15:40:39 +00:00
juce_CharPointer_UTF8_test.cpp Text: Refactor UTF-8 test to prevent warnings 2024-09-30 12:49:57 +01:00
juce_CharPointer_UTF16.h Docs: Replace doxygen preprocessor conditionals with @cond and @endconds 2025-07-21 18:11:43 +02:00
juce_CharPointer_UTF16_test.cpp Text: Improve string validation 2024-09-06 15:40:39 +00:00
juce_CharPointer_UTF32.h Text: Improve string validation 2024-09-06 15:40:39 +00:00
juce_CharPointer_UTF32_test.cpp Text: Improve string validation 2024-09-06 15:40:39 +00:00
juce_Identifier.cpp Update licensing information 2024-04-16 11:39:35 +01:00
juce_Identifier.h Update licensing information 2024-04-16 11:39:35 +01:00
juce_LocalisedStrings.cpp Update licensing information 2024-04-16 11:39:35 +01:00
juce_LocalisedStrings.h Update licensing information 2024-04-16 11:39:35 +01:00
juce_NewLine.h juce_core: guard juce_NewLine.h with #pragma once to prevent MSVC redefinition 2025-09-13 13:33:48 -05:00
juce_String.cpp juce_core: guard juce_NewLine.h with #pragma once to prevent MSVC redefinition 2025-09-13 13:33:48 -05:00
juce_String.h String: Fix a bug in calculating the number of significant digits for exact powers of 10 2025-08-13 13:11:36 +01:00
juce_StringArray.cpp Update licensing information 2024-04-16 11:39:35 +01:00
juce_StringArray.h Update licensing information 2024-04-16 11:39:35 +01:00
juce_StringPairArray.cpp Update licensing information 2024-04-16 11:39:35 +01:00
juce_StringPairArray.h Update licensing information 2024-04-16 11:39:35 +01:00
juce_StringPool.cpp Update licensing information 2024-04-16 11:39:35 +01:00
juce_StringPool.h Update licensing information 2024-04-16 11:39:35 +01:00
juce_StringRef.h Docs: Replace doxygen preprocessor conditionals with @cond and @endconds 2025-07-21 18:11:43 +02:00
juce_TextDiff.cpp Update licensing information 2024-04-16 11:39:35 +01:00
juce_TextDiff.h Update licensing information 2024-04-16 11:39:35 +01:00