-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace every use of the foreach macro with a C++11 range-based for loop #2669
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
INCLUDE(BuildPlugin) | ||
|
||
# Enable C++11 | ||
ADD_DEFINITIONS(-std=c++0x) | ||
|
||
BUILD_PLUGIN(midiexport MidiExport.cpp MidiExport.h MidiFile.hpp | ||
MOCFILES MidiExport.h) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
INCLUDE(BuildPlugin) | ||
|
||
# Enable C++11 | ||
ADD_DEFINITIONS(-std=c++0x) | ||
|
||
BUILD_PLUGIN(lb302 lb302.cpp lb302.h MOCFILES lb302.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png") |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
INCLUDE(BuildPlugin) | ||
|
||
# Enable C++11 | ||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I assume There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Correct, it triggers a warning that it's an invalid option for C files There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
|
||
BUILD_PLUGIN(OPL2 opl2instrument.cpp opl2instrument.h opl.h fmopl.c fmopl.h temuopl.cpp temuopl.h MOCFILES opl2instrument.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you shed some light on why this cast is needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because
NotePlayHandle::nphsOfInstrumentTrack()
returns aConstNotePlayHandleList
, butnotePlayHandle->process()
is invalid for const NotePlayHandles. But as I told michaelgregorius, "that part of InstrumentPlayHandle.h should be removed or otherwise fixed in the near future anyway per #2606 (on which feedback is still welcome, btw)."