Skip to content

Commit

Permalink
Support the default value for wstring
Browse files Browse the repository at this point in the history
Before this patch, when a field of type wstring had a default value,
an error happened.

This patch implements this function. A new dependency, console_bridge,
is add to the macOS platform.

Fix #500
  • Loading branch information
Minggang Wang committed Aug 6, 2019
1 parent 54a6c1f commit 08d397d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- run: brew install python
- run: brew install wget cmake cppcheck tinyxml tinyxml2 eigen pcre poco
- run: brew install openssl
- run: brew install asio
- run: brew install asio console_bridge
- run: python3 -m pip install catkin_pkg empy git+https://github.com/lark-parser/[email protected] pyparsing pyyaml setuptools argcomplete colcon-common-extensions numpy
- run: mkdir -p ~/ros2_install && cd ~/ros2_install && wget https://ci.ros2.org/view/packaging/job/packaging_osx/lastSuccessfulBuild/artifact/ws/ros2-package-osx-x86_64.tar.bz2 && tar xf ros2-package-osx-x86_64.tar.bz2
- run: wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
Expand Down
2 changes: 1 addition & 1 deletion rosidl_gen/templates/message.dot
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ class {{=objectWrapper}} {
{{? field.type.isPrimitiveType && !field.type.isArray}}
{{? field.default_value === null}}
this._{{=field.name}}Intialized = false;
{{?? field.type.type === 'string'}}
{{?? field.type.type === 'string' || field.type.type === 'wstring'}}
this._refObject.{{=field.name}} = "{{=field.default_value.replace(/"/g, '\\"')}}";
this._{{=field.name}}Intialized = true;
{{??}}
Expand Down

0 comments on commit 08d397d

Please sign in to comment.