Supporting dependency injection. Re-request#73
Open
JG-Adams wants to merge 3 commits intozpl-c:masterfrom
Open
Supporting dependency injection. Re-request#73JG-Adams wants to merge 3 commits intozpl-c:masterfrom
JG-Adams wants to merge 3 commits intozpl-c:masterfrom
Conversation
I needed to re-request zpl-c#71 because codespace wasn't working for me. The change I made is an attempt to address the API-compatibility concern. I assumed it had to do with how adding an extra parameter to existing function (enet_host_create) would cause inconsistence requirement. So I addressed this by moving it over to enet_host_create_ext() and reuse the code with enet_host_create calling it set to NULL. Making it behave exactly as one would expect. Hope this is a proper solution! :)
| enet_host_create_ext(address, peerCount, channelLimit, incomingBandwidth, outgoingBandwidth, NULL); | ||
| } /* enet_host_create */ | ||
|
|
||
| ENetHost * enet_host_create_ext(const ENetAddress *address, size_t peerCount, size_t channelLimit, enet_uint32 incomingBandwidth, enet_uint32 outgoingBandwidth, ENetSocket* externalUDPSocket) { |
Check warning
Code scanning / CodeQL
Poorly documented large function Warning
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I needed to re-request #71 because codespace wasn't working for me.
The change I made is an attempt to address the API-compatibility concern. I assumed it had to do with how adding an extra parameter to existing function (enet_host_create) would cause inconsistence requirement. So I addressed this by moving it over to enet_host_create_ext() and reuse the code with enet_host_create calling it set to NULL. Making it behave exactly as one would expect.
Hope this is a proper solution! :)