* Return an std::string
* Be const correct. * Use c_str() to ensure null termination. * Remove stray , from default_mru.json. Originally committed to SVN as r4171.
This commit is contained in:
parent
409bcc561a
commit
6a9b0b5589
3 changed files with 8 additions and 8 deletions
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"Audio" : [],
|
"Audio" : [],
|
||||||
"Video" : [],
|
"Video" : [],
|
||||||
"Scripts" : [],
|
"Scripts" : []
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@ wxBitmap libresrc_getimage(const unsigned char *buff, size_t size) {
|
||||||
return wxBitmap(image);
|
return wxBitmap(image);
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::string libresrc_getconfig(const char *config, size_t size) {
|
const std::string libresrc_getconfig(const unsigned char *config, size_t size) {
|
||||||
std::string str(config, size);
|
std::string str((char*)config, size);
|
||||||
return str;
|
return str.c_str();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
|
#include <string>
|
||||||
|
|
||||||
#include <wx/mstream.h>
|
#include <wx/mstream.h>
|
||||||
#include <wx/bitmap.h>
|
#include <wx/bitmap.h>
|
||||||
#include <wx/image.h>
|
#include <wx/image.h>
|
||||||
|
|
||||||
#include <sstream>
|
|
||||||
|
|
||||||
#include "bitmap.h"
|
#include "bitmap.h"
|
||||||
#include "default_config.h"
|
#include "default_config.h"
|
||||||
|
|
||||||
wxBitmap libresrc_getimage(const unsigned char *image, size_t size);
|
wxBitmap libresrc_getimage(const unsigned char *image, size_t size);
|
||||||
#define GETIMAGE(a) libresrc_getimage(a, sizeof(a))
|
#define GETIMAGE(a) libresrc_getimage(a, sizeof(a))
|
||||||
|
|
||||||
const std::string libresrc_getconfig(const char *config, size_t size);
|
const std::string libresrc_getconfig(const unsigned char *config, size_t size);
|
||||||
#define CET_DEFAULT_CONFIG(a) libresrc_getconfig(a, sizeof(a))
|
#define GET_DEFAULT_CONFIG(a) libresrc_getconfig(a, sizeof(a))
|
||||||
|
|
Loading…
Reference in a new issue