/[svn]/linuxsampler/trunk/src/engines/common/InstrumentScriptVM.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/engines/common/InstrumentScriptVM.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2594 by schoenebeck, Thu Jun 5 00:16:25 2014 UTC revision 2595 by schoenebeck, Thu Jun 5 12:14:53 2014 UTC
# Line 12  Line 12 
12    
13  namespace LinuxSampler {  namespace LinuxSampler {
14    
15      // circumvents a bug in GCC 4.4 which prevents the sizeof() expr to be used      // circumvents a bug in GCC 4.x which causes a sizeof() expression applied
16      // directly within the scrope of a class (would throw a compiler error with:      // on a class member to throw a compiler error, i.e. with GCC 4.4:
17      // "object missing in reference to 'LinuxSampler::AbstractEngineChannel::ControllerTable'")      // "object missing in reference to 'LinuxSampler::AbstractEngineChannel::ControllerTable'")
18      static const int _AbstractEngineChannel_ControllerTable_size = sizeof(AbstractEngineChannel::ControllerTable);      // or with GCC 4.0:
19        // "invalid use of non-static data member 'LinuxSampler::AbstractEngineChannel::ControllerTable'"
20        #define _MEMBER_SIZEOF(T_Class, Member) sizeof(((T_Class*)NULL)->Member)
21    
22      InstrumentScriptVM::InstrumentScriptVM() : m_event(NULL) {      InstrumentScriptVM::InstrumentScriptVM() : m_event(NULL) {
23          m_CC.size = _AbstractEngineChannel_ControllerTable_size;          m_CC.size = _MEMBER_SIZEOF(AbstractEngineChannel, ControllerTable);
24          m_CC_NUM = DECLARE_VMINT(m_cause, class Event, Param.CC.Controller);          m_CC_NUM = DECLARE_VMINT(m_cause, class Event, Param.CC.Controller);
25          m_EVENT_NOTE = DECLARE_VMINT(m_cause, class Event, Param.Note.Key);          m_EVENT_NOTE = DECLARE_VMINT(m_cause, class Event, Param.Note.Key);
26          m_EVENT_VELOCITY = DECLARE_VMINT(m_cause, class Event, Param.Note.Velocity);          m_EVENT_VELOCITY = DECLARE_VMINT(m_cause, class Event, Param.Note.Velocity);

Legend:
Removed from v.2594  
changed lines
  Added in v.2595

  ViewVC Help
Powered by ViewVC