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

42 check pointer not null #44

Closed
wants to merge 2 commits into from
Closed

Conversation

angtsusiong
Copy link
Contributor

Based on @HuaYuan-Tseng work, I add some check to prevent segmentation fault.
#42

HuaYuan-Tseng and others added 2 commits May 15, 2024 22:43
This update includes several changes aimed at improving memory management, configuration process. Notably, it migrates the Bank class usage to leverage  across various components, ensuring safer memory management and ownership semantics.

An adjustment in the  class is the modification of the  method parameter to accept a rvalue reference. This move aligns with modern C++ practices for resource management, enabling efficient transfer of ownership of card objects into a player's hand without unnecessary copying.

On the configuration front, the introduction of JSON parsing for setting up Drogon HTTP listeners and application configurations directly within the codebase provides greater flexibility.

Additionally, the codebase witnesses a broad application of  in drawing cards from the market, further exemplifying the adoption of modern C++ features to handle operations that may not always succeed. This use of  introduces clearer semantics for handling these cases.

Signed-off-by: AngTsusiong <[email protected]>
@angtsusiong
Copy link
Contributor Author

image

@angtsusiong
Copy link
Contributor Author

image

@angtsusiong
Copy link
Contributor Author

angtsusiong commented May 28, 2024

image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants