From e465b71188e1f5885a71e7f5d03ecab3cabff464 Mon Sep 17 00:00:00 2001 From: reuk Date: Thu, 13 Nov 2025 20:19:49 +0000 Subject: [PATCH] Docs: Update language to be more diplomatic --- .../native/juce_ALSA_linux.cpp | 2 +- .../juce_audio_plugin_client_VST2.cpp | 4 ++-- .../format_types/juce_VST3Headers.h | 1 - .../processors/juce_AudioProcessor.h | 2 +- .../juce_HeavyweightLeakedObjectDetector.h | 12 +++++++--- .../memory/juce_LeakedObjectDetector.h | 24 ++++++++++++++----- .../native/juce_BasicNativeHeaders.h | 2 +- .../juce_core/native/juce_Threads_windows.cpp | 2 +- .../juce_opengl/opengl/juce_OpenGLContext.cpp | 2 +- 9 files changed, 34 insertions(+), 17 deletions(-) diff --git a/modules/juce_audio_devices/native/juce_ALSA_linux.cpp b/modules/juce_audio_devices/native/juce_ALSA_linux.cpp index 7de61f823f..84e06961f1 100644 --- a/modules/juce_audio_devices/native/juce_ALSA_linux.cpp +++ b/modules/juce_audio_devices/native/juce_ALSA_linux.cpp @@ -1239,7 +1239,7 @@ private: bool isOutput = (ioid != "Input"); bool isInput = (ioid != "Output"); - // alsa is stupid here, it advertises dmix and dsnoop as input/output devices, but + // ALSA advertises dmix and dsnoop as input/output devices, but // opening dmix as input, or dsnoop as output will trigger errors isInput = isInput && ! id.startsWith ("dmix"); isOutput = isOutput && ! id.startsWith ("dsnoop"); diff --git a/modules/juce_audio_plugin_client/juce_audio_plugin_client_VST2.cpp b/modules/juce_audio_plugin_client/juce_audio_plugin_client_VST2.cpp index 4657039959..6a92f47356 100644 --- a/modules/juce_audio_plugin_client/juce_audio_plugin_client_VST2.cpp +++ b/modules/juce_audio_plugin_client/juce_audio_plugin_client_VST2.cpp @@ -398,8 +398,8 @@ public: // if this fails, the host hasn't called resume() before processing jassert (isProcessing); - // (tragically, some hosts actually need this, although it's stupid to have - // to do it here.) + // (tragically, some hosts actually need this, although it's unfortunate to have + // to do it here) if (! isProcessing) resume(); diff --git a/modules/juce_audio_processors_headless/format_types/juce_VST3Headers.h b/modules/juce_audio_processors_headless/format_types/juce_VST3Headers.h index 29a68c01eb..8ff6844179 100644 --- a/modules/juce_audio_processors_headless/format_types/juce_VST3Headers.h +++ b/modules/juce_audio_processors_headless/format_types/juce_VST3Headers.h @@ -43,7 +43,6 @@ // or , which prevents the use of stricmp in JUCE source. #include -// Wow, those Steinberg guys really don't worry too much about compiler warnings. JUCE_BEGIN_IGNORE_WARNINGS_LEVEL_MSVC (0, 4505 4702 6011 6031 6221 6386 6387 6330 6001 28199) JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-W#warnings", diff --git a/modules/juce_audio_processors_headless/processors/juce_AudioProcessor.h b/modules/juce_audio_processors_headless/processors/juce_AudioProcessor.h index fb4ba635d3..7f2e04c397 100644 --- a/modules/juce_audio_processors_headless/processors/juce_AudioProcessor.h +++ b/modules/juce_audio_processors_headless/processors/juce_AudioProcessor.h @@ -1000,7 +1000,7 @@ public: the correct size before returning it. If you implement this method, you must also implement the hasEditor() method and make it return true. - Remember not to do anything silly like allowing your processor to keep a pointer to + Remember not to do anything like allowing your processor to keep a pointer to the component that gets created - it could be deleted later without any warning, which would make your pointer into a dangler. Use the getActiveEditor() method instead. diff --git a/modules/juce_core/memory/juce_HeavyweightLeakedObjectDetector.h b/modules/juce_core/memory/juce_HeavyweightLeakedObjectDetector.h index 1e242b2da1..a8bb8be664 100644 --- a/modules/juce_core/memory/juce_HeavyweightLeakedObjectDetector.h +++ b/modules/juce_core/memory/juce_HeavyweightLeakedObjectDetector.h @@ -81,9 +81,15 @@ private: the 'OwnerClass' template parameter - the name and stack trace of its creation should have been printed by the lines above. - If you're leaking, it's probably because you're using old-fashioned, non-RAII techniques for - your object management. Tut, tut. Always, always use std::unique_ptrs, OwnedArrays, - ReferenceCountedObjects, etc, and avoid the 'delete' operator at all costs! + Many errors like this are caused by using old-fashioned, non-RAII techniques for + object management. If you're seeing this, it's a good idea to double-check + that you're using std::unique_ptrs, OwnedArrays, + ReferenceCountedObjects, etc, and avoiding manual calls to the 'delete' + operator at all costs! + + You may also see this error if JUCE's shutdown code is called while an object + containing a leak detector is still alive (perhaps declared as a namespace-scope + static). */ jassertfalse; } diff --git a/modules/juce_core/memory/juce_LeakedObjectDetector.h b/modules/juce_core/memory/juce_LeakedObjectDetector.h index f99b47c3f7..35b61db103 100644 --- a/modules/juce_core/memory/juce_LeakedObjectDetector.h +++ b/modules/juce_core/memory/juce_LeakedObjectDetector.h @@ -73,9 +73,15 @@ public: not be this particular deletion that's at fault - the incorrect one may have happened at an earlier point in the program, and simply not been detected until now. - Most errors like this are caused by using old-fashioned, non-RAII techniques for - your object management. Tut, tut. Always, always use std::unique_ptrs, OwnedArrays, - ReferenceCountedObjects, etc, and avoid the 'delete' operator at all costs! + Many errors like this are caused by using old-fashioned, non-RAII techniques for + object management. If you're seeing this, it's a good idea to double-check + that you're using std::unique_ptrs, OwnedArrays, + ReferenceCountedObjects, etc, and avoiding manual calls to the 'delete' + operator at all costs! + + You may also see this error if JUCE's shutdown code is called while an object + containing a leak detector is still alive (perhaps declared as a namespace-scope + static). */ jassertfalse; } @@ -97,9 +103,15 @@ private: /** If you hit this, then you've leaked one or more objects of the type specified by the 'OwnerClass' template parameter - the name should have been printed by the line above. - If you're leaking, it's probably because you're using old-fashioned, non-RAII techniques for - your object management. Tut, tut. Always, always use std::unique_ptrs, OwnedArrays, - ReferenceCountedObjects, etc, and avoid the 'delete' operator at all costs! + Many errors like this are caused by using old-fashioned, non-RAII techniques for + object management. If you're seeing this, it's a good idea to double-check + that you're using std::unique_ptrs, OwnedArrays, + ReferenceCountedObjects, etc, and avoiding manual calls to the 'delete' + operator at all costs! + + You may also see this error if JUCE's shutdown code is called while an object + containing a leak detector is still alive (perhaps declared as a namespace-scope + static). */ jassertfalse; } diff --git a/modules/juce_core/native/juce_BasicNativeHeaders.h b/modules/juce_core/native/juce_BasicNativeHeaders.h index e4fd903e0a..a4d03b656f 100644 --- a/modules/juce_core/native/juce_BasicNativeHeaders.h +++ b/modules/juce_core/native/juce_BasicNativeHeaders.h @@ -276,7 +276,7 @@ #include #endif -// Need to clear various moronic redefinitions made by system headers. +// Need to clear various redefinitions made by system headers. #undef max #undef min #undef direct diff --git a/modules/juce_core/native/juce_Threads_windows.cpp b/modules/juce_core/native/juce_Threads_windows.cpp index c5f15e312b..4609d8aa28 100644 --- a/modules/juce_core/native/juce_Threads_windows.cpp +++ b/modules/juce_core/native/juce_Threads_windows.cpp @@ -295,7 +295,7 @@ void JUCE_CALLTYPE Process::terminate() _CrtDumpMemoryLeaks(); #endif - // bullet in the head in case there's a problem shutting down + // force exit in case there's a problem shutting down ExitProcess (1); } diff --git a/modules/juce_opengl/opengl/juce_OpenGLContext.cpp b/modules/juce_opengl/opengl/juce_OpenGLContext.cpp index b7ad307f7a..fef9f788bd 100644 --- a/modules/juce_opengl/opengl/juce_OpenGLContext.cpp +++ b/modules/juce_opengl/opengl/juce_OpenGLContext.cpp @@ -552,7 +552,7 @@ public: glEnable (GL_TEXTURE_2D); #if JUCE_WINDOWS - // some stupidly old drivers are missing this function, so try to at least avoid a crash here, + // some old drivers are missing this function, so try to at least avoid a crash here, // but if you hit this assertion you may want to have your own version check before using the // component rendering stuff on such old drivers. jassert (context.extensions.glActiveTexture != nullptr);