Fixes for GCC 4.3.

git-svn-id: svn://localhost/ardour2/branches/3.0@3303 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
David Robillard 2008-05-02 18:35:05 +00:00
parent 38eb5f4539
commit da45f489dd
40 changed files with 61 additions and 31 deletions

View file

@ -74,12 +74,13 @@ AutomationController::create(boost::shared_ptr<Automatable> parent, boost::share
void
AutomationController::update_label(char* label, int label_len)
{
if (label && label_len)
if (label && label_len) {
// Hack to display CC rounded to int
if (_controllable->parameter().type() == MidiCCAutomation)
snprintf(label, label_len, "%d", (int)_controllable->get_value());
else
snprintf(label, label_len, "%.3f", _controllable->get_value());
}
}
void