@@ -113,7 +113,6 @@ void DataDictionary::validate( const Message& message,
113113 const DataDictionary* const pAppDD )
114114throw( FIX::Exception )
115115{
116- const bool bodyOnly = pSessionDD == 0 ;
117116 const Header& header = message.getHeader ();
118117 const BeginString& beginString = FIELD_GET_REF ( header, BeginString );
119118 const MsgType& msgType = FIELD_GET_REF ( header, MsgType );
@@ -126,8 +125,8 @@ throw( FIX::Exception )
126125 }
127126
128127 int field = 0 ;
129- if ( (pSessionDD !=0 && pSessionDD->m_checkFieldsOutOfOrder )
130- || (pAppDD != 0 && pAppDD->m_checkFieldsOutOfOrder ) )
128+ if ( (pSessionDD !=0 && pSessionDD->m_checkFieldsOutOfOrder ) ||
129+ (pAppDD != 0 && pAppDD->m_checkFieldsOutOfOrder ) )
131130 {
132131 if ( !message.hasValidStructure (field) )
133132 throw TagOutOfOrder (field);
@@ -139,13 +138,16 @@ throw( FIX::Exception )
139138 pAppDD->checkHasRequired ( message.getHeader (), message, message.getTrailer (), msgType );
140139 }
141140
142- if ( !bodyOnly )
141+ if ( pSessionDD != 0 )
143142 {
144143 pSessionDD->iterate( message.getHeader (), msgType );
145144 pSessionDD->iterate( message.getTrailer (), msgType );
146145 }
147146
148- pAppDD->iterate( message, msgType );
147+ if ( pAppDD != 0 )
148+ {
149+ pAppDD->iterate( message, msgType );
150+ }
149151}
150152
151153void DataDictionary::iterate ( const FieldMap& map, const MsgType& msgType ) const
0 commit comments