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

Unified Diff: media/base/sample_format.h

Issue 148553003: Clean up histogram'd media enum max values. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: FOO_MAX = LAST_VALID_FOO Created 6 years, 11 months 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/base/sample_format.h
diff --git a/media/base/sample_format.h b/media/base/sample_format.h
index 3d2799fa1287e54b6827c3c95be5573daad0ab3c..f4423df50505f3512ebf4b8e781bae64cf26bdb9 100644
--- a/media/base/sample_format.h
+++ b/media/base/sample_format.h
@@ -12,7 +12,8 @@ namespace media {
enum SampleFormat {
// These values are histogrammed over time; do not change their ordinal
// values. When deleting a sample format replace it with a dummy value; when
- // adding a sample format, do so at the bottom before kSampleFormatMax.
+ // adding a sample format, do so at the bottom before kSampleFormatMax, and
+ // upadate the value of kSampleFormatMax.
kUnknownSampleFormat = 0,
kSampleFormatU8, // Unsigned 8-bit w/ bias of 128.
kSampleFormatS16, // Signed 16-bit.
@@ -21,8 +22,8 @@ enum SampleFormat {
kSampleFormatPlanarS16, // Signed 16-bit planar.
kSampleFormatPlanarF32, // Float 32-bit planar.
- // Must always be last!
- kSampleFormatMax
+ // Must always be equal to last entry!
+ kSampleFormatMax = kSampleFormatPlanarF32,
};
// Returns the number of bytes used per channel for the specified

Powered by Google App Engine
This is Rietveld 408576698