Show
Ignore:
Timestamp:
02/20/09 03:14:31 (4 years ago)
Author:
gabriel@…
Message:

Fix several errors flagged by -Wall

gui/src/FilePreview.cpp
gui/src/FilePreview.h

These files were totally commented out and have been untouched
for over a year. They have been deleted.

libs/hydrogen/include/hydrogen/instrument.h
libs/hydrogen/src/instrument.cpp

Instrument::get_layer() marked inline, so code moved to header to make it inline.
Instrument::Instrument() Triggered a pedantic error about initialization. So,

parameters were rearranged to match the order they were declared.

libs/hydrogen/src/local_file_mgr.cpp

LocalFileMng::saveDrumkit() was not using the pSample local variable.

gui/src/PatternEditor/PianoRollEditor.cpp
gui/src/PatternEditor/PianoRollEditor.h
libs/hydrogen/src/midiMap.cpp
libs/hydrogen/src/sequencer/sequencer.cpp

Add newline to ends of files. (An error on some old compilers.)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/libs/hydrogen/include/hydrogen/instrument.h

    r571 r818  
    2525#define INSTRUMENT_H 
    2626 
     27#include <QtCore/QString> 
    2728#include <hydrogen/globals.h> 
    2829#include <hydrogen/Object.h> 
     
    127128 
    128129        /// Returns a layer in the list 
     130        /// See below for definition. 
    129131        inline InstrumentLayer* get_layer( int index ); 
    130132 
     
    309311}; 
    310312 
    311  
     313inline InstrumentLayer* Instrument::get_layer( int nLayer ) 
     314{ 
     315        if ( nLayer < 0 ) { 
     316                ERRORLOG( QString( "nLayer < 0 (nLayer=%1)" ).arg( nLayer ) ); 
     317                return NULL; 
     318        } 
     319        if ( nLayer >= MAX_LAYERS ) { 
     320                ERRORLOG( QString( "nLayer > MAX_LAYERS (nLayer=%1)" ).arg( nLayer ) ); 
     321                return NULL; 
     322        } 
     323 
     324        return __layer_list[ nLayer ]; 
     325} 
    312326 
    313327