From 6d475c40de567d778fa6f96c379687a8bf83f82b Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 25 Oct 2013 19:09:22 +0200 Subject: ReplayGainInfo: use CamelCase for struct name --- src/tag/ApeReplayGain.cxx | 14 +++++++------- src/tag/ApeReplayGain.hxx | 4 ++-- src/tag/TagRva2.cxx | 14 +++++++------- src/tag/TagRva2.hxx | 4 ++-- 4 files changed, 18 insertions(+), 18 deletions(-) (limited to 'src/tag') diff --git a/src/tag/ApeReplayGain.cxx b/src/tag/ApeReplayGain.cxx index 15526d2d9..12919690e 100644 --- a/src/tag/ApeReplayGain.cxx +++ b/src/tag/ApeReplayGain.cxx @@ -29,7 +29,7 @@ static bool replay_gain_ape_callback(unsigned long flags, const char *key, const char *_value, size_t value_length, - struct replay_gain_info *info) + ReplayGainInfo &info) { /* we only care about utf-8 text tags */ if ((flags & (0x3 << 1)) != 0) @@ -43,27 +43,27 @@ replay_gain_ape_callback(unsigned long flags, const char *key, value[value_length] = 0; if (StringEqualsCaseASCII(key, "replaygain_track_gain")) { - info->tuples[REPLAY_GAIN_TRACK].gain = atof(value); + info.tuples[REPLAY_GAIN_TRACK].gain = atof(value); return true; } else if (StringEqualsCaseASCII(key, "replaygain_album_gain")) { - info->tuples[REPLAY_GAIN_ALBUM].gain = atof(value); + info.tuples[REPLAY_GAIN_ALBUM].gain = atof(value); return true; } else if (StringEqualsCaseASCII(key, "replaygain_track_peak")) { - info->tuples[REPLAY_GAIN_TRACK].peak = atof(value); + info.tuples[REPLAY_GAIN_TRACK].peak = atof(value); return true; } else if (StringEqualsCaseASCII(key, "replaygain_album_peak")) { - info->tuples[REPLAY_GAIN_ALBUM].peak = atof(value); + info.tuples[REPLAY_GAIN_ALBUM].peak = atof(value); return true; } else return false; } bool -replay_gain_ape_read(const char *path_fs, struct replay_gain_info *info) +replay_gain_ape_read(const char *path_fs, ReplayGainInfo &info) { bool found = false; - auto callback = [info, &found] + auto callback = [&info, &found] (unsigned long flags, const char *key, const char *value, size_t value_length) { diff --git a/src/tag/ApeReplayGain.hxx b/src/tag/ApeReplayGain.hxx index 4bc34a9d2..f40523550 100644 --- a/src/tag/ApeReplayGain.hxx +++ b/src/tag/ApeReplayGain.hxx @@ -22,9 +22,9 @@ #include "check.h" -struct replay_gain_info; +struct ReplayGainInfo; bool -replay_gain_ape_read(const char *path_fs, struct replay_gain_info *info); +replay_gain_ape_read(const char *path_fs, ReplayGainInfo &info); #endif diff --git a/src/tag/TagRva2.cxx b/src/tag/TagRva2.cxx index 071e3a443..204001aa7 100644 --- a/src/tag/TagRva2.cxx +++ b/src/tag/TagRva2.cxx @@ -73,7 +73,7 @@ rva2_float_volume_adjustment(const struct rva2_data *data) } static inline bool -rva2_apply_data(struct replay_gain_info *replay_gain_info, +rva2_apply_data(ReplayGainInfo &rgi, const struct rva2_data *data, const id3_latin1_t *id) { if (data->type != CHANNEL_MASTER_VOLUME) @@ -82,19 +82,19 @@ rva2_apply_data(struct replay_gain_info *replay_gain_info, float volume_adjustment = rva2_float_volume_adjustment(data); if (strcmp((const char *)id, "album") == 0) { - replay_gain_info->tuples[REPLAY_GAIN_ALBUM].gain = volume_adjustment; + rgi.tuples[REPLAY_GAIN_ALBUM].gain = volume_adjustment; } else if (strcmp((const char *)id, "track") == 0) { - replay_gain_info->tuples[REPLAY_GAIN_TRACK].gain = volume_adjustment; + rgi.tuples[REPLAY_GAIN_TRACK].gain = volume_adjustment; } else { - replay_gain_info->tuples[REPLAY_GAIN_ALBUM].gain = volume_adjustment; - replay_gain_info->tuples[REPLAY_GAIN_TRACK].gain = volume_adjustment; + rgi.tuples[REPLAY_GAIN_ALBUM].gain = volume_adjustment; + rgi.tuples[REPLAY_GAIN_TRACK].gain = volume_adjustment; } return true; } static bool -rva2_apply_frame(struct replay_gain_info *replay_gain_info, +rva2_apply_frame(ReplayGainInfo &replay_gain_info, const struct id3_frame *frame) { const id3_latin1_t *id = id3_field_getlatin1(id3_frame_field(frame, 0)); @@ -133,7 +133,7 @@ rva2_apply_frame(struct replay_gain_info *replay_gain_info, } bool -tag_rva2_parse(struct id3_tag *tag, struct replay_gain_info *replay_gain_info) +tag_rva2_parse(struct id3_tag *tag, ReplayGainInfo &replay_gain_info) { bool found = false; diff --git a/src/tag/TagRva2.hxx b/src/tag/TagRva2.hxx index 016a3585d..98154041a 100644 --- a/src/tag/TagRva2.hxx +++ b/src/tag/TagRva2.hxx @@ -23,7 +23,7 @@ #include "check.h" struct id3_tag; -struct replay_gain_info; +struct ReplayGainInfo; /** * Parse the RVA2 tag, and fill the #replay_gain_info struct. This is @@ -32,6 +32,6 @@ struct replay_gain_info; * @return true on success */ bool -tag_rva2_parse(struct id3_tag *tag, struct replay_gain_info *replay_gain_info); +tag_rva2_parse(struct id3_tag *tag, ReplayGainInfo &replay_gain_info); #endif -- cgit v1.2.3