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

EASY_END_BLOCK doesn't support function syntax #139

Closed
mathieumallet opened this issue Nov 27, 2018 · 2 comments
Closed

EASY_END_BLOCK doesn't support function syntax #139

mathieumallet opened this issue Nov 27, 2018 · 2 comments
Labels
core Issues related to easy_profiler_core resolved suggestion wontfix

Comments

@mathieumallet
Copy link

Currently, EASY_END_BLOCK calls cannot use function syntax. For example the following fails to compile:

EASY_BLOCK("Foo");
Foo();
EASY_END_BLOCK();

image

Currently, the following is required instead:

EASY_BLOCK("Foo");
Foo();
EASY_END_BLOCK;

This differs from other macros such as EASY_FUNCTION(); which allows being called with empty parenthesis. For ease of use, EASY_END_BLOCK should support being called with empty parenthesis.

@cas4ey
Copy link
Collaborator

cas4ey commented Nov 28, 2018

Hi @mmallet-youilabs

The macro EASY_FUNCTION() has parenthesis because it has optional input args.
EASY_END_BLOCK does not since it has no input args at all.

However, it is not very good idea to change API which is currently in use. We could create additional macro with parenthesis, but I think it would be better if you will do it on your own by defining/redefing this macro for your project individually.

@mathieumallet
Copy link
Author

That’s fair :) I didn’t know if it was possible to support parenthesis and no parenthesis at the same time.

@cas4ey cas4ey added wontfix suggestion resolved core Issues related to easy_profiler_core labels Jan 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Issues related to easy_profiler_core resolved suggestion wontfix
Projects
None yet
Development

No branches or pull requests

2 participants