mirror of https://github.com/OpenTTD/OpenTTD
Adjust existing code to review before proceeding
parent
42fa4ca53c
commit
0bf94569e3
|
@ -1,6 +1,4 @@
|
||||||
/.cache
|
|
||||||
/.vs
|
/.vs
|
||||||
/.vscode
|
|
||||||
/build*
|
/build*
|
||||||
CMakeSettings.json
|
CMakeSettings.json
|
||||||
docs/aidocs/*
|
docs/aidocs/*
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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();
|
||||||
|
|
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue