Better build fix after r242901.
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 13 Mar 2019 21:22:33 +0000 (21:22 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 13 Mar 2019 21:22:33 +0000 (21:22 +0000)
Reviewed by Jer Noble.

Source/WebCore:

* platform/audio/cocoa/MediaSessionManagerCocoa.mm:
(MediaSessionManagerCocoa::sessionWillBeginPlayback):
(MediaSessionManagerCocoa::updateNowPlayingInfo):

Source/WTF:

* wtf/Logger.h:
(WTF::LogArgument::toString):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242909 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WTF/ChangeLog
Source/WTF/wtf/Logger.h
Source/WebCore/ChangeLog
Source/WebCore/platform/audio/cocoa/MediaSessionManagerCocoa.mm

index aed2278..57f2df5 100644 (file)
@@ -1,3 +1,12 @@
+2019-03-13  Chris Dumez  <cdumez@apple.com>
+
+        Better build fix after r242901.
+
+        Reviewed by Jer Noble.
+
+        * wtf/Logger.h:
+        (WTF::LogArgument::toString):
+
 2019-03-13  Jer Noble  <jer.noble@apple.com>
 
         Add AggregateLogger, a Logger specialization for singleton classes.
index 8bd993d..d00cc8c 100644 (file)
@@ -36,6 +36,7 @@ struct LogArgument {
     template<typename U = T> static typename std::enable_if<std::is_same<U, unsigned>::value, String>::type toString(unsigned argument) { return String::number(argument); }
     template<typename U = T> static typename std::enable_if<std::is_same<U, unsigned long>::value, String>::type toString(unsigned long argument) { return String::number(argument); }
     template<typename U = T> static typename std::enable_if<std::is_same<U, long>::value, String>::type toString(long argument) { return String::number(argument); }
+    template<typename U = T> static typename std::enable_if<std::is_enum<U>::value, String>::type toString(U argument) { return String::number(static_cast<typename std::underlying_type<U>::type>(argument)); }
     template<typename U = T> static typename std::enable_if<std::is_same<U, float>::value, String>::type toString(float argument) { return String::numberToStringFixedPrecision(argument); }
     template<typename U = T> static typename std::enable_if<std::is_same<U, double>::value, String>::type toString(double argument) { return String::numberToStringFixedPrecision(argument); }
     template<typename U = T> static typename std::enable_if<std::is_same<typename std::remove_reference<U>::type, AtomicString>::value, String>::type toString(const AtomicString& argument) { return argument.string(); }
index de32077..e0a2021 100644 (file)
@@ -1,3 +1,13 @@
+2019-03-13  Chris Dumez  <cdumez@apple.com>
+
+        Better build fix after r242901.
+
+        Reviewed by Jer Noble.
+
+        * platform/audio/cocoa/MediaSessionManagerCocoa.mm:
+        (MediaSessionManagerCocoa::sessionWillBeginPlayback):
+        (MediaSessionManagerCocoa::updateNowPlayingInfo):
+
 2019-03-13  Timothy Hatcher  <timothy@apple.com>
 
         Consolidate ArgumentCodersMac and ArgumentCodersCocoa.
index c278f68..b73fdef 100644 (file)
@@ -139,7 +139,7 @@ bool MediaSessionManagerCocoa::sessionWillBeginPlayback(PlatformMediaSession& se
 {
     if (!PlatformMediaSessionManager::sessionWillBeginPlayback(session))
         return false;
-    
+
     scheduleUpdateNowPlayingInfo();
     return true;
 }
@@ -213,7 +213,7 @@ void MediaSessionManagerCocoa::updateNowPlayingInfo()
             UNUSED_PARAM(error);
 #else
             if (error)
-                ALWAYS_LOG(LOGIDENTIFIER, "MRMediaRemoteSetNowPlayingApplicationPlaybackStateForOrigin(stopped) failed with error ", static_cast<uint32_t>(error));
+                ALWAYS_LOG(LOGIDENTIFIER, "MRMediaRemoteSetNowPlayingApplicationPlaybackStateForOrigin(stopped) failed with error ", error);
 #endif
         });
 
@@ -268,7 +268,7 @@ void MediaSessionManagerCocoa::updateNowPlayingInfo()
 #if LOG_DISABLED
         UNUSED_PARAM(error);
 #else
-        ALWAYS_LOG(LOGIDENTIFIER, "MRMediaRemoteSetNowPlayingApplicationPlaybackStateForOrigin(playing) failed with error ", static_cast<uint32_t>(error));
+        ALWAYS_LOG(LOGIDENTIFIER, "MRMediaRemoteSetNowPlayingApplicationPlaybackStateForOrigin(playing) failed with error ", error);
 #endif
     });
     MRMediaRemoteSetNowPlayingInfo(info.get());