Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1229)

Unified Diff: media/audio/audio_parameters.h

Issue 1468803002: Switch to static_assert. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@assert1
Patch Set: message cleanup Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/web/navigation/crw_session_certificate_policy_manager.mm ('k') | media/base/yuv_convert.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/audio_parameters.h
diff --git a/media/audio/audio_parameters.h b/media/audio/audio_parameters.h
index 61ca8121f9e98e20bcae5e7511579b81cb773815..c59dd30885e36672cde8eb6e1a2086ac3e94a2ee 100644
--- a/media/audio/audio_parameters.h
+++ b/media/audio/audio_parameters.h
@@ -29,8 +29,8 @@ namespace media {
#pragma warning(disable: 4324) // Disable warning for added padding.
#endif
#define PARAMETERS_ALIGNMENT 16
-COMPILE_ASSERT(AudioBus::kChannelAlignment == PARAMETERS_ALIGNMENT,
- AudioInputBufferParameters_alignment_not_same_as_AudioBus);
+static_assert(AudioBus::kChannelAlignment == PARAMETERS_ALIGNMENT,
+ "AudioInputBufferParameters alignment not same as AudioBus");
struct MEDIA_EXPORT ALIGNAS(PARAMETERS_ALIGNMENT) AudioInputBufferParameters {
double volume;
uint32 size;
@@ -43,9 +43,10 @@ struct MEDIA_EXPORT ALIGNAS(PARAMETERS_ALIGNMENT) AudioInputBufferParameters {
#pragma warning(pop)
#endif
-COMPILE_ASSERT(
- sizeof(AudioInputBufferParameters) % AudioBus::kChannelAlignment == 0,
- AudioInputBufferParameters_not_aligned);
+static_assert(sizeof(AudioInputBufferParameters) %
+ AudioBus::kChannelAlignment ==
+ 0,
+ "AudioInputBufferParameters not aligned");
struct MEDIA_EXPORT AudioInputBuffer {
AudioInputBufferParameters params;
« no previous file with comments | « ios/web/navigation/crw_session_certificate_policy_manager.mm ('k') | media/base/yuv_convert.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698