mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Convert ignoreUnused to [[maybe_unused]]
This commit is contained in:
parent
4351e87bdd
commit
28f2157912
141 changed files with 1057 additions and 1209 deletions
|
|
@ -150,15 +150,13 @@ JUCE_IMPLEMENT_SINGLETON (ContentSharer)
|
|||
ContentSharer::ContentSharer() {}
|
||||
ContentSharer::~ContentSharer() { clearSingletonInstance(); }
|
||||
|
||||
void ContentSharer::shareFiles (const Array<URL>& files,
|
||||
void ContentSharer::shareFiles ([[maybe_unused]] const Array<URL>& files,
|
||||
std::function<void (bool, const String&)> callbackToUse)
|
||||
{
|
||||
#if JUCE_CONTENT_SHARING
|
||||
startNewShare (callbackToUse);
|
||||
pimpl->shareFiles (files);
|
||||
#else
|
||||
ignoreUnused (files);
|
||||
|
||||
// Content sharing is not available on this platform!
|
||||
jassertfalse;
|
||||
|
||||
|
|
@ -188,15 +186,13 @@ void ContentSharer::startNewShare (std::function<void (bool, const String&)> cal
|
|||
}
|
||||
#endif
|
||||
|
||||
void ContentSharer::shareText (const String& text,
|
||||
void ContentSharer::shareText ([[maybe_unused]] const String& text,
|
||||
std::function<void (bool, const String&)> callbackToUse)
|
||||
{
|
||||
#if JUCE_CONTENT_SHARING
|
||||
startNewShare (callbackToUse);
|
||||
pimpl->shareText (text);
|
||||
#else
|
||||
ignoreUnused (text);
|
||||
|
||||
// Content sharing is not available on this platform!
|
||||
jassertfalse;
|
||||
|
||||
|
|
@ -205,16 +201,14 @@ void ContentSharer::shareText (const String& text,
|
|||
#endif
|
||||
}
|
||||
|
||||
void ContentSharer::shareImages (const Array<Image>& images,
|
||||
void ContentSharer::shareImages ([[maybe_unused]] const Array<Image>& images,
|
||||
std::function<void (bool, const String&)> callbackToUse,
|
||||
ImageFileFormat* imageFileFormatToUse)
|
||||
[[maybe_unused]] ImageFileFormat* imageFileFormatToUse)
|
||||
{
|
||||
#if JUCE_CONTENT_SHARING
|
||||
startNewShare (callbackToUse);
|
||||
prepareImagesThread.reset (new PrepareImagesThread (*this, images, imageFileFormatToUse));
|
||||
#else
|
||||
ignoreUnused (images, imageFileFormatToUse);
|
||||
|
||||
// Content sharing is not available on this platform!
|
||||
jassertfalse;
|
||||
|
||||
|
|
@ -238,15 +232,13 @@ void ContentSharer::filesToSharePrepared()
|
|||
}
|
||||
#endif
|
||||
|
||||
void ContentSharer::shareData (const MemoryBlock& mb,
|
||||
void ContentSharer::shareData ([[maybe_unused]] const MemoryBlock& mb,
|
||||
std::function<void (bool, const String&)> callbackToUse)
|
||||
{
|
||||
#if JUCE_CONTENT_SHARING
|
||||
startNewShare (callbackToUse);
|
||||
prepareDataThread.reset (new PrepareDataThread (*this, mb));
|
||||
#else
|
||||
ignoreUnused (mb);
|
||||
|
||||
if (callbackToUse)
|
||||
callbackToUse (false, "Content sharing not available on this platform!");
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -440,7 +440,7 @@ void FileBrowserComponent::fileDoubleClicked (const File& f)
|
|||
|
||||
void FileBrowserComponent::browserRootChanged (const File&) {}
|
||||
|
||||
bool FileBrowserComponent::keyPressed (const KeyPress& key)
|
||||
bool FileBrowserComponent::keyPressed ([[maybe_unused]] const KeyPress& key)
|
||||
{
|
||||
#if JUCE_LINUX || JUCE_BSD || JUCE_WINDOWS
|
||||
if (key.getModifiers().isCommandDown()
|
||||
|
|
@ -452,7 +452,6 @@ bool FileBrowserComponent::keyPressed (const KeyPress& key)
|
|||
}
|
||||
#endif
|
||||
|
||||
ignoreUnused (key);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue