drogon
drogon copied to clipboard
remove unnecessary macros
In TimeFilter.cc, there is code: #define VDate "visitDate"
Is there any reason for this? I understand it is only an example and is not really a bug, but when people read drogon code, they should see really good code all around to increase its popularity and usage.
Why it is unnecessary ? If we use "visitDate" everywhere in the code, it becomes an error-prone magic string.
@hwc0919 The macro can be static constexpr std::string_view VDate = "visitDate", then this is better. The macros can be detected by clang-tidy (cppcoreguidelines-macro-usage), so this is https://github.com/drogonframework/drogon/issues/1927 's task.