1
0
Fork 0

Adjust existing code to review before proceeding

pull/11391/head
yeah-its-gloria 2023-10-24 04:35:37 +02:00
parent 42fa4ca53c
commit 0bf94569e3
No known key found for this signature in database
GPG Key ID: 2F70763FC641BC89
4 changed files with 5 additions and 7 deletions

2
.gitignore vendored
View File

@ -1,6 +1,4 @@
/.cache
/.vs /.vs
/.vscode
/build* /build*
CMakeSettings.json CMakeSettings.json
docs/aidocs/* docs/aidocs/*

View File

@ -5,7 +5,7 @@
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/ */
/** @file network_chat_gui.cpp GUI for handling chat messages. */ /** @file loader.cpp Loader code for social plugins. */
#include "../../stdafx.h" #include "../../stdafx.h"
#include "../network_func.h" #include "../network_func.h"

View File

@ -5,12 +5,11 @@
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/ */
/** @file network_client.h Client part of the network protocol. */ /** @file loader.h Social plugin loader class. */
#ifndef NETWORK_SOCIAL_LOADER_H #ifndef NETWORK_SOCIAL_LOADER_H
#define NETWORK_SOCIAL_LOADER_H #define NETWORK_SOCIAL_LOADER_H
#include "../../core/alloc_type.hpp"
#include "social_api.h" #include "social_api.h"
struct SocialPlatformPlugin { struct SocialPlatformPlugin {
@ -24,7 +23,7 @@ struct SocialPlatformPlugin {
void* userdata; void* userdata;
}; };
class SocialPlatformLoader : public ZeroedMemoryAllocator { class SocialPlatformLoader {
public: public:
void Shutdown(); void Shutdown();
void RunDispatch(); void RunDispatch();

View File

@ -5,7 +5,7 @@
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/ */
/** @file survey_win.cpp Windows implementation of OS-specific survey information. */ /** @file social_win.cpp Win32 backing implementation for social plugin loading. */
#include "../../stdafx.h" #include "../../stdafx.h"
@ -43,6 +43,7 @@ void LoadSocialPlatforms(std::vector<SocialPlatformPlugin>& plugins) {
if (plugin.initialize == nullptr || plugin.shutdown == nullptr || plugin.dispatch == nullptr || plugin.newState == nullptr) { if (plugin.initialize == nullptr || plugin.shutdown == nullptr || plugin.dispatch == nullptr || plugin.newState == nullptr) {
FreeLibrary(library); FreeLibrary(library);
continue;
} }
plugins.push_back(plugin); plugins.push_back(plugin);