You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello there,
I have some recommendation that can enhance maintainability, and performance and generally improve overall project quality.
Maintainability
In general, comments make maintainability more difficult, because if you want to change a part of the code, you have to change its comment too, thus violating the duplication principle (DRY principle). Therefore, it is good to use comments only where needed and avoid commenting where the function of the code is obvious.
Making the logging approach more controllable! In the current codebase, there is a general syntax for logging messages, but no function to generate them (messages are generated directly within the code). If you decide to change the logging message syntax, you would need to update all logging-related code manually, or developers would have to write the message syntax every time.
Adding at least one level of abstraction for the Boost library to make the code more maintainable.
Performance
Using std::make_shared instead of new for keep shared pointer control block and object block in contiguous memory blocks (better performance).
General
Using #ifndef/#define and #pragma once as include guards is redundant. #ifndef/#define can be removed, and only #pragma once can be used because almost all modern C++ compilers support it.
The text was updated successfully, but these errors were encountered:
Hello there,
I have some recommendation that can enhance maintainability, and performance and generally improve overall project quality.
Maintainability
Performance
std::make_shared
instead ofnew
for keep shared pointer control block and object block in contiguous memory blocks (better performance).General
#ifndef/#define
and#pragma once
as include guards is redundant.#ifndef/#define
can be removed, and only#pragma once
can be used because almost all modern C++ compilers support it.The text was updated successfully, but these errors were encountered: