Skip to content

Commit

Permalink
Fix compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
falkTX committed Nov 13, 2021
1 parent 6e5ea98 commit 1ea2d1e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions braids/settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ class Settings {
}

inline int32_t pitch_transposition() const {
int32_t t = data_.pitch_range == PITCH_RANGE_LFO ? -36 << 7 : 0;
int32_t t = data_.pitch_range == PITCH_RANGE_LFO ? (unsigned)-36 << 7 : 0;
t += (static_cast<int32_t>(data_.pitch_octave) - 2) * 12 * 128;
return t;
}
Expand Down Expand Up @@ -351,7 +351,7 @@ class Settings {
return metadata_[setting];
}

static const Setting setting_at_index(int16_t index) {
static const Setting& setting_at_index(int16_t index) {
return settings_order_[index];
}

Expand Down
2 changes: 1 addition & 1 deletion frames/poly_lfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class PolyLfo {
inline const uint8_t* color() const {
return &color_[0];
}
inline const uint16_t dac_code(uint8_t index) const {
inline uint16_t dac_code(uint8_t index) const {
return dac_code_[index];
}
static uint32_t FrequencyToPhaseIncrement(int32_t frequency);
Expand Down
2 changes: 1 addition & 1 deletion stages/delay_line_16_bits.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class DelayLine16Bits {
}
}

inline const float Read(float delay) const {
inline float Read(float delay) const {
MAKE_INTEGRAL_FRACTIONAL(delay)
size_t read_ptr = (write_ptr_ + delay_integral) % max_delay;
float a = static_cast<float>(line_[read_ptr]) / 32768.0f;
Expand Down

0 comments on commit 1ea2d1e

Please sign in to comment.