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

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: win 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
Index: media/audio/audio_parameters.h
diff --git a/media/audio/audio_parameters.h b/media/audio/audio_parameters.h
index 61ca8121f9e98e20bcae5e7511579b81cb773815..240a34d05080a62b2e179c13c2f64ff4a321ff8d 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;

Powered by Google App Engine
This is Rietveld 408576698