Add clang-tidy support for the CDM

Bug: 256230932
Change-Id: Id3fcf024cd7dcf95218876b81359d6418f5aa067
This commit is contained in:
Ian Benz
2023-04-11 20:46:08 +00:00
committed by Robert Shih
parent b7b423aca3
commit cebd90e300
37 changed files with 209 additions and 185 deletions

View File

@@ -10,8 +10,6 @@
#include "log.h"
using video_widevine::License;
namespace wvcdm {
void PolicyTimers::SetLicense(const video_widevine::License& license) {
@@ -68,7 +66,7 @@ bool PolicyTimers::GetSecondsSinceStarted(int64_t current_time,
if (playback_start_time_ == 0) return false;
*seconds_since_started = current_time - playback_start_time_;
return (*seconds_since_started >= 0) ? true : false;
return *seconds_since_started >= 0;
}
bool PolicyTimers::GetSecondsSinceLastPlayed(
@@ -81,7 +79,7 @@ bool PolicyTimers::GetSecondsSinceLastPlayed(
if (last_playback_time_ == 0) return false;
*seconds_since_last_played = current_time - last_playback_time_;
return (*seconds_since_last_played >= 0) ? true : false;
return *seconds_since_last_played >= 0;
}
bool PolicyTimers::IsLicenseForFuture(int64_t current_time) {