Skip to content

Conversation

@njzjz
Copy link
Member

@njzjz njzjz commented Nov 28, 2023

Modified the DPMD_CVT_STR macro to handle multiple arguments by using __VA_ARGS__. This resolves #2952, the error caused by commas in the branch name during compilation.

This commit (including the above message) is entirely generated by ChatGPT 3.5.

Modified the `DPMD_CVT_STR` macro to handle multiple arguments by using `__VA_ARGS__`. This resolves the error caused by commas in the branch name during compilation.

This commit (including the above message) is entirely generated by ChatGPT 3.5.

Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
@codecov
Copy link

codecov bot commented Nov 28, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (b4bb3a9) 75.73% compared to head (9a55f5d) 75.73%.

Additional details and impacted files
@@           Coverage Diff           @@
##            devel    #3016   +/-   ##
=======================================
  Coverage   75.73%   75.73%           
=======================================
  Files         245      245           
  Lines       24686    24686           
  Branches     1591     1591           
=======================================
  Hits        18697    18697           
  Misses       5054     5054           
  Partials      935      935           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@njzjz njzjz requested a review from wanghan-iapcm November 28, 2023 22:51
Copy link
Collaborator

@wanghan-iapcm wanghan-iapcm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

explanation generated by chatgpt:

DPMD_CVT_STR(...), uses a variadic argument __VA_ARGS__, which means that it can take any number of arguments. It also uses the # operator to convert the arguments into a string literal. For example, if you call DPMD_CVT_STR(hello, world), it will expand to "hello, world".

The use of ... in the second macro allows for multiple arguments to be passed, and the use of #__VA_ARGS__ converts all the arguments into a single string literal, with each argument separated by a comma and a space.

@wanghan-iapcm wanghan-iapcm merged commit 12baf12 into deepmodeling:devel Nov 29, 2023
@njzjz njzjz added the bug label Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Compilation error when the git branch name contains special characters

2 participants