mirror of
https://gitlab.com/Mr_Goldberg/goldberg_emulator.git
synced 2025-04-21 21:52:06 +02:00
Clang fixes.
This commit is contained in:
parent
c5afbe9fea
commit
59cb19e56a
9 changed files with 75 additions and 69 deletions
|
@ -141,6 +141,12 @@ inline void reset_LastError()
|
|||
#include <utime.h>
|
||||
|
||||
#include <inttypes.h>
|
||||
#ifndef PRIu64
|
||||
#define PRIu64 "I64u"
|
||||
#endif
|
||||
#ifndef PRIuPTR
|
||||
#define PRIuPTR "Iu"
|
||||
#endif
|
||||
#define PRI_ZU "zu"
|
||||
|
||||
#define PATH_MAX_STRING_SIZE 512
|
||||
|
|
18
dll/dll.h
18
dll/dll.h
|
@ -25,6 +25,15 @@
|
|||
#define STEAMCLIENT_API static
|
||||
#endif
|
||||
|
||||
Steam_Client *get_steam_client();
|
||||
bool steamclient_has_ipv6_functions();
|
||||
Steam_Client *try_get_steam_client();
|
||||
|
||||
HSteamUser flat_hsteamuser();
|
||||
HSteamPipe flat_hsteampipe();
|
||||
HSteamUser flat_gs_hsteamuser();
|
||||
HSteamPipe flat_gs_hsteampipe();
|
||||
|
||||
#define GOLDBERG_CALLBACK_INTERNAL(parent, fname, cb_type) \
|
||||
struct GB_CCallbackInternal_ ## fname : private GB_CCallbackInterImp< sizeof(cb_type) > { \
|
||||
public: \
|
||||
|
@ -158,12 +167,3 @@ class GB_CCallbackInterImp : protected CCallbackBase
|
|||
return;
|
||||
}
|
||||
};
|
||||
|
||||
Steam_Client *get_steam_client();
|
||||
bool steamclient_has_ipv6_functions();
|
||||
Steam_Client *try_get_steam_client();
|
||||
|
||||
HSteamUser flat_hsteamuser();
|
||||
HSteamPipe flat_hsteampipe();
|
||||
HSteamUser flat_gs_hsteamuser();
|
||||
HSteamPipe flat_gs_hsteampipe();
|
||||
|
|
|
@ -34,7 +34,7 @@ struct File_Data {
|
|||
std::string name;
|
||||
};
|
||||
|
||||
std::string convert_vector_image_pixel_t_to_std_string(std::vector<image_pixel_t> & in) {
|
||||
std::string convert_vector_image_pixel_t_to_std_string(std::vector<image_pixel_t> in) {
|
||||
std::string out;
|
||||
|
||||
for (auto i : in) {
|
||||
|
@ -233,7 +233,7 @@ void Local_Storage::setAppId(uint32 appid)
|
|||
|
||||
}
|
||||
|
||||
int Local_Storage::store_file_data(std::string folder, std::string file, char *data, unsigned int length)
|
||||
int Local_Storage::store_file_data(std::string folder, std::string file, const char *data, unsigned int length)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
@ -243,7 +243,7 @@ int Local_Storage::store_data(std::string folder, std::string file, char *data,
|
|||
return -1;
|
||||
}
|
||||
|
||||
int Local_Storage::store_data_settings(std::string file, char *data, unsigned int length)
|
||||
int Local_Storage::store_data_settings(std::string file, const char *data, unsigned int length)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
@ -777,7 +777,7 @@ void Local_Storage::setAppId(uint32 appid)
|
|||
this->appid = std::to_string(appid) + PATH_SEPARATOR;
|
||||
}
|
||||
|
||||
int Local_Storage::store_file_data(std::string folder, std::string file, char *data, unsigned int length)
|
||||
int Local_Storage::store_file_data(std::string folder, std::string file, const char *data, unsigned int length)
|
||||
{
|
||||
if (folder.back() != *PATH_SEPARATOR) {
|
||||
folder.append(PATH_SEPARATOR);
|
||||
|
@ -836,7 +836,7 @@ int Local_Storage::store_data(std::string folder, std::string file, char *data,
|
|||
return store_file_data(save_directory + appid + folder, file, data, length);
|
||||
}
|
||||
|
||||
int Local_Storage::store_data_settings(std::string file, char *data, unsigned int length)
|
||||
int Local_Storage::store_data_settings(std::string file, const char *data, unsigned int length)
|
||||
{
|
||||
return store_file_data(get_global_settings_path(), file, data, length);
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ struct image_t
|
|||
std::vector<image_pixel_t> pix_map;
|
||||
};
|
||||
|
||||
std::string convert_vector_image_pixel_t_to_std_string(std::vector<image_pixel_t> & in);
|
||||
std::string convert_vector_image_pixel_t_to_std_string(std::vector<image_pixel_t> in);
|
||||
std::string convert_raw_uint8_to_png_std_string(uint8 * in, int width, int height, int components);
|
||||
std::string convert_raw_uint8_to_jpg_std_string(uint8 * in, int width, int height, int components);
|
||||
|
||||
|
@ -74,11 +74,11 @@ public:
|
|||
static int get_file_data(std::string full_path, char *data, unsigned int max_length, unsigned int offset=0);
|
||||
static int copy_file_data(std::string src_full_path, std::string dest_full_path);
|
||||
void setAppId(uint32 appid);
|
||||
static int store_file_data(std::string folder, std::string file, char *data, unsigned int length);
|
||||
static int store_file_data(std::string folder, std::string file, const char *data, unsigned int length);
|
||||
static std::vector<std::string> get_filenames_path(std::string path);
|
||||
|
||||
int store_data(std::string folder, std::string file, char *data, unsigned int length);
|
||||
int store_data_settings(std::string file, char *data, unsigned int length);
|
||||
int store_data_settings(std::string file, const char *data, unsigned int length);
|
||||
int get_data(std::string folder, std::string file, char *data, unsigned int max_length, unsigned int offset=0);
|
||||
int get_data_settings(std::string file, char *data, unsigned int max_length);
|
||||
int count_files(std::string folder);
|
||||
|
|
|
@ -413,7 +413,7 @@ void Steam_Friends::Callback(Common_Message *msg)
|
|||
}
|
||||
}
|
||||
|
||||
delete raw_image;
|
||||
delete [] raw_image;
|
||||
raw_image = NULL;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue