1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Optional: Make operator bool() explicit

This commit is contained in:
reuk 2023-01-04 14:02:08 +00:00
parent 0774162691
commit b46edc31ce
No known key found for this signature in database
GPG key ID: 9ADCD339CFC98A11
2 changed files with 2 additions and 2 deletions

View file

@ -1073,7 +1073,7 @@ namespace AAXClasses
return transport.IsTransportPlaying (&isPlaying) == AAX_SUCCESS && isPlaying;
}());
info.setIsRecording (recordingState.get());
info.setIsRecording (recordingState.get().orFallback (false));
const auto optionalTimeInSamples = [&info, &transport]
{

View file

@ -126,7 +126,7 @@ public:
decltype (auto) operator* () { return opt.operator* (); }
decltype (auto) operator* () const { return opt.operator* (); }
operator bool() const noexcept { return opt.has_value(); }
explicit operator bool() const noexcept { return opt.has_value(); }
bool hasValue() const noexcept { return opt.has_value(); }
template <typename U>