Use std::function instead of inhereting from CNetFileReceiveTask
commit0ad15a93ac90707db68fe546ea3ed3710d77d290
authorphosit <phosit@3db68df2-c116-0410-a063-a993310a9797>
Sat, 9 Mar 2024 14:31:43 +0000 (9 14:31 +0000)
committerphosit <phosit@3db68df2-c116-0410-a063-a993310a9797>
Sat, 9 Mar 2024 14:31:43 +0000 (9 14:31 +0000)
tree5e0b966fa99ac59f75107968ec38bf538d76d36b
parent41b45658c846973b8b6a4f132b441c653c3512fc
Use std::function instead of inhereting from CNetFileReceiveTask

The user doesn't have to fiddle with `std::shared_ptr`.
And two (more unrelated) things: use `std::unordered_map`, use a `std::find_if` in the callback.

Comments By: @vladislavbelov, @Stan

Differential Revision: https://code.wildfiregames.com/D5239

git-svn-id: https://svn.wildfiregames.com/public/ps/trunk@28048 3db68df2-c116-0410-a063-a993310a9797
source/network/NetClient.cpp
source/network/NetClient.h
source/network/NetFileTransfer.cpp
source/network/NetFileTransfer.h
source/network/NetServer.cpp
source/network/NetServer.h
source/network/tests/test_FileTransfer.h [new file with mode: 0644]