/[svn]/linuxsampler/trunk/src/scriptvm/common.h
ViewVC logotype

Diff of /linuxsampler/trunk/src/scriptvm/common.h

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

revision 3012 by schoenebeck, Wed Oct 12 12:50:37 2016 UTC revision 3034 by schoenebeck, Mon Oct 31 00:05:00 2016 UTC
# Line 581  namespace LinuxSampler { Line 581  namespace LinuxSampler {
581       * complexity inside the sampler engines which provide the actual script       * complexity inside the sampler engines which provide the actual script
582       * functionalities.       * functionalities.
583       */       */
584      #define DECLARE_VMINT(basePtr, T_struct, T_member) ( \      #define DECLARE_VMINT(basePtr, T_struct, T_member) (          \
585          (VMRelPtr) {                                     \          /* Disable offsetof warning, trust us, we are cautios. */ \
586              (void**) &basePtr,                           \          _Pragma("GCC diagnostic push")                            \
587              offsetof(T_struct, T_member),                \          _Pragma("GCC diagnostic ignored \"-Winvalid-offsetof\"")  \
588              false                                        \          (VMRelPtr) {                                              \
589          }                                                \              (void**) &basePtr,                                    \
590      )                                                    \              offsetof(T_struct, T_member),                         \
591                false                                                 \
592            }                                                         \
593            _Pragma("GCC diagnostic pop")                             \
594        )                                                             \
595    
596      /**      /**
597       * Same as DECLARE_VMINT(), but this one defines the VMIntRelPtr and       * Same as DECLARE_VMINT(), but this one defines the VMIntRelPtr and
# Line 603  namespace LinuxSampler { Line 607  namespace LinuxSampler {
607       * @see ScriptVM::builtInConstIntVariables()       * @see ScriptVM::builtInConstIntVariables()
608       */       */
609      #define DECLARE_VMINT_READONLY(basePtr, T_struct, T_member) ( \      #define DECLARE_VMINT_READONLY(basePtr, T_struct, T_member) ( \
610          (VMRelPtr) {                                          \          /* Disable offsetof warning, trust us, we are cautios. */ \
611              (void**) &basePtr,                                \          _Pragma("GCC diagnostic push")                            \
612              offsetof(T_struct, T_member),                     \          _Pragma("GCC diagnostic ignored \"-Winvalid-offsetof\"")  \
613              true                                              \          (VMRelPtr) {                                              \
614          }                                                     \              (void**) &basePtr,                                    \
615      )                                                         \              offsetof(T_struct, T_member),                         \
616                true                                                  \
617            }                                                         \
618            _Pragma("GCC diagnostic pop")                             \
619        )                                                             \
620    
621      /** @brief Built-in VM 8 bit integer array variable.      /** @brief Built-in VM 8 bit integer array variable.
622       *       *
# Line 708  namespace LinuxSampler { Line 716  namespace LinuxSampler {
716           * @param expr - new value to be assigned to this variable           * @param expr - new value to be assigned to this variable
717           */           */
718          void assignExpr(VMExpr* expr) OVERRIDE {}          void assignExpr(VMExpr* expr) OVERRIDE {}
719    
720            virtual ~VMDynVar() {}
721      };      };
722    
723      /** @brief Dynamically executed variable (of integer data type).      /** @brief Dynamically executed variable (of integer data type).

Legend:
Removed from v.3012  
changed lines
  Added in v.3034

  ViewVC Help
Powered by ViewVC