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

refactor more cpp #122

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open

Conversation

gocarlos
Copy link
Member

see commits for detailed infos

@gocarlos gocarlos requested a review from jimsch May 25, 2020 11:28
target_link_libraries(cose_dumper PRIVATE cn-cbor::cn-cbor cose-c::cose-c)
if(MSVC)
target_link_libraries(cose_dumper PRIVATE ws2_32)
endif()

target_include_directories(cose_dumper PRIVATE ../src)
target_compile_options(cose_dumper PRIVATE "-fpermissive")
Copy link
Member Author

Choose a reason for hiding this comment

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

as we are using cpp, we can overload functions -> we should get rid if macros that insert , context to the argument list IMHO

Copy link
Contributor

Choose a reason for hiding this comment

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

It is not going to be possible to remove all of these macros as the CBOR library is still in C. I am also not too sure how much one can rely on linkers to not require functions exist, I know that one can compile each function into a separate block for MSVC but I don't know for sure that this exists in gcc and clang as they are not the compilers that I use much

@coveralls
Copy link

coveralls commented May 25, 2020

Coverage Status

Coverage increased (+0.004%) to 89.862% when pulling b3c4990 on gocarlos:refactor--more-cpp into ae2c5f7 on cose-wg:master.

@@ -28,7 +28,7 @@ typedef struct _cose_mac* HCOSE_MAC;
typedef struct _cose_mac0* HCOSE_MAC0;
typedef struct _cose_counterSignature* HCOSE_COUNTERSIGN;
typedef struct _cose_counterSignature1* HCOSE_COUNTERSIGN1;
typedef struct _cose_key* HCOSE_KEY;
typedef class COSE_KEY* HCOSE_KEY;
Copy link
Contributor

Choose a reason for hiding this comment

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

My C compiler is going to produce an error over the word class in this file.

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.

3 participants