X-Ryl669 / eMQTT5

An embedded MQTTv5 client in C++ with minimal footprint, maximal performance
MIT License
65 stars 14 forks source link

Clean source dependency for readability #5

Closed shinyaohtani closed 3 years ago

shinyaohtani commented 3 years ago

I found some improvement for source readability during #4 .

#include <something/something.hpp>

is better than:

#include "../../something/something.hpp"

because ../../ is too strong method we can indicate any files without path setting.

X-Ryl669 commented 3 years ago

Yep. I agree, but it also means that you must add -I/path/to/include/folder to compiler flags. For a library that's being included by others, I think it's a pain to do so. Not sure what is the best to do here.

shinyaohtani commented 3 years ago

You have already added ${CMAKE_CURRENT_SOURCE_DIR}/include, so only we have to do is change the #include statement. we don't need to add -I/path/to/include/folder any more. If you don't like it, just close the PR without merging to master. It's no problem.

X-Ryl669 commented 3 years ago

No, I meant for those not using cmake, like ESP32. I'll test it tonight and let you know when I'm done.

shinyaohtani commented 3 years ago

Ah, I see!

X-Ryl669 commented 3 years ago

I think I've solved the issue, please test the latest master branch and report if it's ok for you.

shinyaohtani commented 3 years ago

Thank you very much for your prompt response. I think what I pointed out has been properly corrected. So I close this issue. You don't need to merge https://github.com/X-Ryl669/eMQTT5/pull/6 at all because it is problematic.