1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-09 23:34:20 +00:00
This commit is contained in:
Ben Kuper 2026-01-07 19:49:15 +01:00 committed by GitHub
commit 43421249fb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 15 additions and 0 deletions

View file

@ -64,6 +64,14 @@
#include <juce_core/juce_core.h>
#include <juce_events/juce_events.h>
/** Config: JUCE_ALLOW_SPECIAL_CHARS_IN_ADDRESS
Enables the use of characters in adress that are not allowed by the OSC specifications (like spaces), but that are used
by some applications anyway (e.g. /my spaced/address)
*/
#ifndef JUCE_ALLOW_SPECIAL_CHARS_IN_ADDRESS
#define JUCE_ALLOW_SPECIAL_CHARS_IN_ADDRESS 0
#endif
//==============================================================================
#include "osc/juce_OSCTypes.h"
#include "osc/juce_OSCTimeTag.h"

View file

@ -283,10 +283,17 @@ namespace
return c >= ' ' && c <= '~';
}
#pragma warning(push)
#pragma warning(disable: 4100)
static bool isDisallowedChar (juce_wchar c) noexcept
{
#if JUCE_ALLOW_SPECIAL_CHARS_IN_ADDRESS
return false;
#else
return CharPointer_ASCII (Traits::getDisallowedChars()).indexOf (c, false) >= 0;
#endif
}
#pragma warning(pop)
static bool containsOnlyAllowedPrintableASCIIChars (const String& string) noexcept
{