Index: media/midi/midi_manager_usb.cc |
diff --git a/media/midi/midi_manager_usb.cc b/media/midi/midi_manager_usb.cc |
index 71b81abcabb5370ed15e64cf8042b290dd90fac2..cefbc1aac35c7865afb2be47f52701d7e5629f5b 100644 |
--- a/media/midi/midi_manager_usb.cc |
+++ b/media/midi/midi_manager_usb.cc |
@@ -74,7 +74,7 @@ |
} |
void MidiManagerUsb::OnDeviceAttached(scoped_ptr<UsbMidiDevice> device) { |
- int device_id = static_cast<int>(devices_.size()); |
+ int device_id = devices_.size(); |
devices_.push_back(device.release()); |
AddPorts(devices_.back(), device_id); |
} |
@@ -86,13 +86,13 @@ |
UsbMidiDevice* device = devices_[index]; |
for (size_t i = 0; i < output_streams_.size(); ++i) { |
if (output_streams_[i]->jack().device == device) { |
- SetOutputPortState(static_cast<uint32>(i), MIDI_PORT_DISCONNECTED); |
+ SetOutputPortState(i, MIDI_PORT_DISCONNECTED); |
} |
} |
const std::vector<UsbMidiJack>& input_jacks = input_stream_->jacks(); |
for (size_t i = 0; i < input_jacks.size(); ++i) { |
if (input_jacks[i].device == device) { |
- SetInputPortState(static_cast<uint32>(i), MIDI_PORT_DISCONNECTED); |
+ SetInputPortState(i, MIDI_PORT_DISCONNECTED); |
} |
} |
} |
@@ -101,7 +101,7 @@ |
const uint8* data, |
size_t size, |
base::TimeTicks time) { |
- ReceiveMidiData(static_cast<uint32>(jack_index), data, size, time); |
+ ReceiveMidiData(jack_index, data, size, time); |
} |
@@ -114,7 +114,7 @@ |
input_stream_.reset(new UsbMidiInputStream(this)); |
devices->swap(devices_); |
for (size_t i = 0; i < devices_.size(); ++i) { |
- if (!AddPorts(devices_[i], static_cast<int>(i))) { |
+ if (!AddPorts(devices_[i], i)) { |
initialize_callback_.Run(MIDI_INITIALIZATION_ERROR); |
return; |
} |