Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

when array_len is nil, do not run dotimes... #55

Merged
merged 1 commit into from
Jan 26, 2020

Conversation

k-okada
Copy link
Member

@k-okada k-okada commented Nov 16, 2017

to avoid consuing like jsk-ros-pkg/jsk_roseus#544

Message like

MultiArrayDimension[] dim # Array of dimension properties
uint32 data_offset        # padding elements at front of data

is converted to

(defmethod std_msgs::MultiArrayLayout
  (:init
   (&key
    ((:dim __dim) (let (r) (dotimes (i 0) (push (instance std_msgs::MultiArrayDimension :init) r)) r)) 
;;何もしていない
    ((:data_offset __data_offset) 0)
    )

which seems we can write something like

(instnace std_msgs::MultiArrayLayout :init :dim 10)

but this is not correct, we should write something like

(instance std_msgs::MultiArrayLayout :init :dim (let (r) (dotimes (i 10) (push (instance std_msgs::MultiArrayDimension :init) r))))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant