Ver Fonte

fix typedef array parameters

David Rose há 21 anos atrás
pai
commit
5acbeb698e
1 ficheiros alterados com 6 adições e 0 exclusões
  1. 6 0
      direct/src/dcparser/dcArrayParameter.cxx

+ 6 - 0
direct/src/dcparser/dcArrayParameter.cxx

@@ -166,6 +166,12 @@ get_array_size() const {
 ////////////////////////////////////////////////////////////////////
 DCParameter *DCArrayParameter::
 append_array_specification(const DCUnsignedIntRange &size) {
+  if (get_typedef() != (DCTypedef *)NULL) {
+    // If this was a typedef, wrap it directly.
+    return new DCArrayParameter(this, size);
+  }
+
+  // Otherwise, the brackets get applied to the inner type.
   _element_type = _element_type->append_array_specification(size);
   return this;
 }