More silly warning elimination
This commit is contained in:
parent
6ae3b48b7d
commit
8e546b1bed
|
@ -21,7 +21,8 @@
|
|||
|
||||
#include "mapinc.h"
|
||||
|
||||
static uint8 IRQCount, IRQPre;
|
||||
static uint8 IRQCount;
|
||||
//static uint8 IRQPre;
|
||||
static uint8 IRQa;
|
||||
static uint8 prg_reg[2];
|
||||
static uint8 chr_reg[8];
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#include "mapinc.h"
|
||||
#include "mmc3.h"
|
||||
|
||||
static uint8 m_perm[8] = {0, 1, 0, 3, 0, 5, 6, 7};
|
||||
//static uint8 m_perm[8] = {0, 1, 0, 3, 0, 5, 6, 7};
|
||||
|
||||
static void UNLA9711PW(uint32 A, uint8 V)
|
||||
{
|
||||
|
|
|
@ -78,9 +78,7 @@ CreateDirs(const std::string &dir)
|
|||
static void
|
||||
GetBaseDirectory(std::string &dir)
|
||||
{
|
||||
char *home, *lastBS;
|
||||
|
||||
home = getenv("HOME");
|
||||
char *home = getenv("HOME");
|
||||
if(home) {
|
||||
dir = std::string(home) + "/.fceultra";
|
||||
} else {
|
||||
|
@ -88,7 +86,7 @@ GetBaseDirectory(std::string &dir)
|
|||
home = new char[MAX_PATH + 1];
|
||||
GetModuleFileName(NULL, home, MAX_PATH + 1);
|
||||
|
||||
lastBS = strrchr(home,'\\');
|
||||
char *lastBS = strrchr(home,'\\');
|
||||
if(lastBS) {
|
||||
*lastBS = 0;
|
||||
}
|
||||
|
|
|
@ -1429,3 +1429,97 @@ UpdateInput(Config *config)
|
|||
fkbmap[j].NumC = 1;
|
||||
}
|
||||
}
|
||||
|
||||
// Definitions from main.h:
|
||||
// GamePad defaults
|
||||
const char *GamePadNames[GAMEPAD_NUM_BUTTONS] =
|
||||
{"A", "B", "Select", "Start",
|
||||
"Up", "Down", "Left", "Right", "TurboA", "TurboB"};
|
||||
const char *DefaultGamePadDevice[GAMEPAD_NUM_DEVICES] =
|
||||
{"Keyboard", "None", "None", "None"};
|
||||
const int DefaultGamePad[GAMEPAD_NUM_DEVICES][GAMEPAD_NUM_BUTTONS] =
|
||||
{ { SDLK_KP2, SDLK_KP3, SDLK_TAB, SDLK_RETURN,
|
||||
SDLK_w, SDLK_s, SDLK_a, SDLK_d, 0, 0 },
|
||||
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } };
|
||||
|
||||
// PowerPad defaults
|
||||
const char *PowerPadNames[POWERPAD_NUM_BUTTONS] =
|
||||
{"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B"};
|
||||
const char *DefaultPowerPadDevice[POWERPAD_NUM_DEVICES] =
|
||||
{"Keyboard", "None"};
|
||||
const int DefaultPowerPad[POWERPAD_NUM_DEVICES][POWERPAD_NUM_BUTTONS] =
|
||||
{ { SDLK_o, SDLK_p, SDLK_LEFTBRACKET, SDLK_RIGHTBRACKET,
|
||||
SDLK_k, SDLK_l, SDLK_SEMICOLON, SDLK_QUOTE,
|
||||
SDLK_m, SDLK_COMMA, SDLK_PERIOD, SDLK_SLASH },
|
||||
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } };
|
||||
|
||||
// QuizKing defaults
|
||||
const char *QuizKingNames[QUIZKING_NUM_BUTTONS] =
|
||||
{ "0", "1", "2", "3", "4", "5" };
|
||||
const char *DefaultQuizKingDevice = "Keyboard";
|
||||
const int DefaultQuizKing[QUIZKING_NUM_BUTTONS] =
|
||||
{ SDLK_q, SDLK_w, SDLK_e, SDLK_r, SDLK_t, SDLK_y };
|
||||
|
||||
// HyperShot defaults
|
||||
const char *HyperShotNames[HYPERSHOT_NUM_BUTTONS] =
|
||||
{ "0", "1", "2", "3" };
|
||||
const char *DefaultHyperShotDevice = "Keyboard";
|
||||
const int DefaultHyperShot[HYPERSHOT_NUM_BUTTONS] =
|
||||
{ SDLK_q, SDLK_w, SDLK_e, SDLK_r };
|
||||
|
||||
// Mahjong defaults
|
||||
const char *MahjongNames[MAHJONG_NUM_BUTTONS] =
|
||||
{ "00", "01", "02", "03", "04", "05", "06", "07",
|
||||
"08", "09", "10", "11", "12", "13", "14", "15",
|
||||
"16", "17", "18", "19", "20" };
|
||||
const char *DefaultMahjongDevice = "Keyboard";
|
||||
const int DefaultMahjong[MAHJONG_NUM_BUTTONS] =
|
||||
{ SDLK_q, SDLK_w, SDLK_e, SDLK_r, SDLK_t, SDLK_a, SDLK_s, SDLK_d,
|
||||
SDLK_f, SDLK_g, SDLK_h, SDLK_j, SDLK_k, SDLK_l, SDLK_z, SDLK_x,
|
||||
SDLK_c, SDLK_v, SDLK_b, SDLK_n, SDLK_m };
|
||||
|
||||
// TopRider defaults
|
||||
const char *TopRiderNames[TOPRIDER_NUM_BUTTONS] =
|
||||
{ "0", "1", "2", "3", "4", "5", "6", "7" };
|
||||
const char *DefaultTopRiderDevice = "Keyboard";
|
||||
const int DefaultTopRider[TOPRIDER_NUM_BUTTONS] =
|
||||
{ SDLK_q, SDLK_w, SDLK_e, SDLK_r, SDLK_t, SDLK_y, SDLK_u, SDLK_i };
|
||||
|
||||
// FTrainer defaults
|
||||
const char *FTrainerNames[FTRAINER_NUM_BUTTONS] =
|
||||
{ "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B" };
|
||||
const char *DefaultFTrainerDevice = "Keyboard";
|
||||
const int DefaultFTrainer[FTRAINER_NUM_BUTTONS] =
|
||||
{ SDLK_o, SDLK_p, SDLK_LEFTBRACKET, SDLK_RIGHTBRACKET,
|
||||
SDLK_k, SDLK_l, SDLK_SEMICOLON, SDLK_QUOTE,
|
||||
SDLK_m, SDLK_COMMA, SDLK_PERIOD, SDLK_SLASH };
|
||||
|
||||
// FamilyKeyBoard defaults
|
||||
const char *FamilyKeyBoardNames[FAMILYKEYBOARD_NUM_BUTTONS] =
|
||||
{ "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8",
|
||||
"1", "2", "3", "4", "5", "6", "7", "8", "9", "0",
|
||||
"MINUS", "EQUAL", "BACKSLASH", "BACKSPACE",
|
||||
"ESCAPE", "Q", "W", "E", "R", "T", "Y", "U", "I", "O",
|
||||
"P", "GRAVE", "BRACKET_LEFT", "ENTER",
|
||||
"LEFTCONTROL", "A", "S", "D", "F", "G", "H", "J", "K",
|
||||
"L", "SEMICOLON", "APOSTROPHE", "BRACKET_RIGHT", "INSERT",
|
||||
"LEFTSHIFT", "Z", "X", "C", "V", "B", "N", "M", "COMMA",
|
||||
"PERIOD", "SLASH", "RIGHTALT", "RIGHTSHIFT", "LEFTALT", "SPACE",
|
||||
"DELETE", "END", "PAGEDOWN",
|
||||
"CURSORUP", "CURSORLEFT", "CURSORRIGHT", "CURSORDOWN" };
|
||||
const char *DefaultFamilyKeyBoardDevice = "Keyboard";
|
||||
const int DefaultFamilyKeyBoard[FAMILYKEYBOARD_NUM_BUTTONS] =
|
||||
{ SDLK_F1, SDLK_F2, SDLK_F3, SDLK_F4, SDLK_F5, SDLK_F6, SDLK_F7, SDLK_F8,
|
||||
SDLK_1, SDLK_2, SDLK_3, SDLK_4, SDLK_5,
|
||||
SDLK_6, SDLK_7, SDLK_8, SDLK_9, SDLK_0,
|
||||
SDLK_MINUS, SDLK_EQUALS, SDLK_BACKSLASH, SDLK_BACKSPACE,
|
||||
SDLK_ESCAPE, SDLK_q, SDLK_w, SDLK_e, SDLK_r, SDLK_t, SDLK_y, SDLK_u,
|
||||
SDLK_i, SDLK_o, SDLK_p, SDLK_BACKQUOTE, SDLK_LEFTBRACKET, SDLK_RETURN,
|
||||
SDLK_LCTRL, SDLK_a, SDLK_s, SDLK_d, SDLK_f, SDLK_g, SDLK_h, SDLK_j,
|
||||
SDLK_k, SDLK_l, SDLK_SEMICOLON, SDLK_QUOTE, SDLK_RIGHTBRACKET,
|
||||
SDLK_INSERT, SDLK_LSHIFT, SDLK_z, SDLK_x, SDLK_c, SDLK_v, SDLK_b,
|
||||
SDLK_n, SDLK_m, SDLK_COMMA, SDLK_PERIOD, SDLK_SLASH, SDLK_RALT,
|
||||
SDLK_RSHIFT, SDLK_LALT, SDLK_SPACE, SDLK_DELETE, SDLK_END, SDLK_PAGEDOWN,
|
||||
SDLK_UP, SDLK_LEFT, SDLK_RIGHT, SDLK_DOWN };
|
||||
|
|
|
@ -52,104 +52,51 @@ int CLImain(int argc, char *argv[]);
|
|||
// GamePad defaults
|
||||
#define GAMEPAD_NUM_DEVICES 4
|
||||
#define GAMEPAD_NUM_BUTTONS 10
|
||||
static const char *GamePadNames[GAMEPAD_NUM_BUTTONS] =
|
||||
{"A", "B", "Select", "Start",
|
||||
"Up", "Down", "Left", "Right", "TurboA", "TurboB"};
|
||||
static const char *DefaultGamePadDevice[GAMEPAD_NUM_DEVICES] =
|
||||
{"Keyboard", "None", "None", "None"};
|
||||
static const int DefaultGamePad[GAMEPAD_NUM_DEVICES][GAMEPAD_NUM_BUTTONS] =
|
||||
{ { SDLK_KP2, SDLK_KP3, SDLK_TAB, SDLK_RETURN,
|
||||
SDLK_w, SDLK_s, SDLK_a, SDLK_d, 0, 0 },
|
||||
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } };
|
||||
extern const char *GamePadNames[GAMEPAD_NUM_BUTTONS];
|
||||
extern const char *DefaultGamePadDevice[GAMEPAD_NUM_DEVICES];
|
||||
extern const int DefaultGamePad[GAMEPAD_NUM_DEVICES][GAMEPAD_NUM_BUTTONS];
|
||||
|
||||
// PowerPad defaults
|
||||
#define POWERPAD_NUM_DEVICES 2
|
||||
#define POWERPAD_NUM_BUTTONS 12
|
||||
static const char *PowerPadNames[POWERPAD_NUM_BUTTONS] =
|
||||
{"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B"};
|
||||
static const char *DefaultPowerPadDevice[POWERPAD_NUM_DEVICES] =
|
||||
{"Keyboard", "None"};
|
||||
static const int DefaultPowerPad[POWERPAD_NUM_DEVICES][POWERPAD_NUM_BUTTONS] =
|
||||
{ { SDLK_o, SDLK_p, SDLK_LEFTBRACKET, SDLK_RIGHTBRACKET,
|
||||
SDLK_k, SDLK_l, SDLK_SEMICOLON, SDLK_QUOTE,
|
||||
SDLK_m, SDLK_COMMA, SDLK_PERIOD, SDLK_SLASH },
|
||||
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } };
|
||||
extern const char *PowerPadNames[POWERPAD_NUM_BUTTONS];
|
||||
extern const char *DefaultPowerPadDevice[POWERPAD_NUM_DEVICES];
|
||||
extern const int DefaultPowerPad[POWERPAD_NUM_DEVICES][POWERPAD_NUM_BUTTONS];
|
||||
|
||||
// QuizKing defaults
|
||||
#define QUIZKING_NUM_BUTTONS 6
|
||||
static const char *QuizKingNames[QUIZKING_NUM_BUTTONS] =
|
||||
{ "0", "1", "2", "3", "4", "5" };
|
||||
static const char *DefaultQuizKingDevice = "Keyboard";
|
||||
static const int DefaultQuizKing[QUIZKING_NUM_BUTTONS] =
|
||||
{ SDLK_q, SDLK_w, SDLK_e, SDLK_r, SDLK_t, SDLK_y };
|
||||
extern const char *QuizKingNames[QUIZKING_NUM_BUTTONS];
|
||||
extern const char *DefaultQuizKingDevice;
|
||||
extern const int DefaultQuizKing[QUIZKING_NUM_BUTTONS];
|
||||
|
||||
// HyperShot defaults
|
||||
#define HYPERSHOT_NUM_BUTTONS 4
|
||||
static const char *HyperShotNames[HYPERSHOT_NUM_BUTTONS] =
|
||||
{ "0", "1", "2", "3" };
|
||||
static const char *DefaultHyperShotDevice = "Keyboard";
|
||||
static const int DefaultHyperShot[HYPERSHOT_NUM_BUTTONS] =
|
||||
{ SDLK_q, SDLK_w, SDLK_e, SDLK_r };
|
||||
extern const char *HyperShotNames[HYPERSHOT_NUM_BUTTONS];
|
||||
extern const char *DefaultHyperShotDevice;
|
||||
extern const int DefaultHyperShot[HYPERSHOT_NUM_BUTTONS];
|
||||
|
||||
// Mahjong defaults
|
||||
#define MAHJONG_NUM_BUTTONS 21
|
||||
static const char *MahjongNames[MAHJONG_NUM_BUTTONS] =
|
||||
{ "00", "01", "02", "03", "04", "05", "06", "07",
|
||||
"08", "09", "10", "11", "12", "13", "14", "15",
|
||||
"16", "17", "18", "19", "20" };
|
||||
static const char *DefaultMahjongDevice = "Keyboard";
|
||||
static const int DefaultMahjong[MAHJONG_NUM_BUTTONS] =
|
||||
{ SDLK_q, SDLK_w, SDLK_e, SDLK_r, SDLK_t, SDLK_a, SDLK_s, SDLK_d,
|
||||
SDLK_f, SDLK_g, SDLK_h, SDLK_j, SDLK_k, SDLK_l, SDLK_z, SDLK_x,
|
||||
SDLK_c, SDLK_v, SDLK_b, SDLK_n, SDLK_m };
|
||||
extern const char *MahjongNames[MAHJONG_NUM_BUTTONS];
|
||||
extern const char *DefaultMahjongDevice;
|
||||
extern const int DefaultMahjong[MAHJONG_NUM_BUTTONS];
|
||||
|
||||
// TopRider defaults
|
||||
#define TOPRIDER_NUM_BUTTONS 8
|
||||
static const char *TopRiderNames[TOPRIDER_NUM_BUTTONS] =
|
||||
{ "0", "1", "2", "3", "4", "5", "6", "7" };
|
||||
static const char *DefaultTopRiderDevice = "Keyboard";
|
||||
static const int DefaultTopRider[TOPRIDER_NUM_BUTTONS] =
|
||||
{ SDLK_q, SDLK_w, SDLK_e, SDLK_r, SDLK_t, SDLK_y, SDLK_u, SDLK_i };
|
||||
extern const char *TopRiderNames[TOPRIDER_NUM_BUTTONS];
|
||||
extern const char *DefaultTopRiderDevice;
|
||||
extern const int DefaultTopRider[TOPRIDER_NUM_BUTTONS];
|
||||
|
||||
// FTrainer defaults
|
||||
#define FTRAINER_NUM_BUTTONS 12
|
||||
static const char *FTrainerNames[FTRAINER_NUM_BUTTONS] =
|
||||
{ "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B" };
|
||||
static const char *DefaultFTrainerDevice = "Keyboard";
|
||||
static const int DefaultFTrainer[FTRAINER_NUM_BUTTONS] =
|
||||
{ SDLK_o, SDLK_p, SDLK_LEFTBRACKET, SDLK_RIGHTBRACKET,
|
||||
SDLK_k, SDLK_l, SDLK_SEMICOLON, SDLK_QUOTE,
|
||||
SDLK_m, SDLK_COMMA, SDLK_PERIOD, SDLK_SLASH };
|
||||
extern const char *FTrainerNames[FTRAINER_NUM_BUTTONS];
|
||||
extern const char *DefaultFTrainerDevice;
|
||||
extern const int DefaultFTrainer[FTRAINER_NUM_BUTTONS];
|
||||
|
||||
// FamilyKeyBoard defaults
|
||||
#define FAMILYKEYBOARD_NUM_BUTTONS 0x48
|
||||
static const char *FamilyKeyBoardNames[FAMILYKEYBOARD_NUM_BUTTONS] =
|
||||
{ "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8",
|
||||
"1", "2", "3", "4", "5", "6", "7", "8", "9", "0",
|
||||
"MINUS", "EQUAL", "BACKSLASH", "BACKSPACE",
|
||||
"ESCAPE", "Q", "W", "E", "R", "T", "Y", "U", "I", "O",
|
||||
"P", "GRAVE", "BRACKET_LEFT", "ENTER",
|
||||
"LEFTCONTROL", "A", "S", "D", "F", "G", "H", "J", "K",
|
||||
"L", "SEMICOLON", "APOSTROPHE", "BRACKET_RIGHT", "INSERT",
|
||||
"LEFTSHIFT", "Z", "X", "C", "V", "B", "N", "M", "COMMA",
|
||||
"PERIOD", "SLASH", "RIGHTALT", "RIGHTSHIFT", "LEFTALT", "SPACE",
|
||||
"DELETE", "END", "PAGEDOWN",
|
||||
"CURSORUP", "CURSORLEFT", "CURSORRIGHT", "CURSORDOWN" };
|
||||
static const char *DefaultFamilyKeyBoardDevice = "Keyboard";
|
||||
static const int DefaultFamilyKeyBoard[FAMILYKEYBOARD_NUM_BUTTONS] =
|
||||
{ SDLK_F1, SDLK_F2, SDLK_F3, SDLK_F4, SDLK_F5, SDLK_F6, SDLK_F7, SDLK_F8,
|
||||
SDLK_1, SDLK_2, SDLK_3, SDLK_4, SDLK_5,
|
||||
SDLK_6, SDLK_7, SDLK_8, SDLK_9, SDLK_0,
|
||||
SDLK_MINUS, SDLK_EQUALS, SDLK_BACKSLASH, SDLK_BACKSPACE,
|
||||
SDLK_ESCAPE, SDLK_q, SDLK_w, SDLK_e, SDLK_r, SDLK_t, SDLK_y, SDLK_u,
|
||||
SDLK_i, SDLK_o, SDLK_p, SDLK_BACKQUOTE, SDLK_LEFTBRACKET, SDLK_RETURN,
|
||||
SDLK_LCTRL, SDLK_a, SDLK_s, SDLK_d, SDLK_f, SDLK_g, SDLK_h, SDLK_j,
|
||||
SDLK_k, SDLK_l, SDLK_SEMICOLON, SDLK_QUOTE, SDLK_RIGHTBRACKET,
|
||||
SDLK_INSERT, SDLK_LSHIFT, SDLK_z, SDLK_x, SDLK_c, SDLK_v, SDLK_b,
|
||||
SDLK_n, SDLK_m, SDLK_COMMA, SDLK_PERIOD, SDLK_SLASH, SDLK_RALT,
|
||||
SDLK_RSHIFT, SDLK_LALT, SDLK_SPACE, SDLK_DELETE, SDLK_END, SDLK_PAGEDOWN,
|
||||
SDLK_UP, SDLK_LEFT, SDLK_RIGHT, SDLK_DOWN };
|
||||
extern const char *FamilyKeyBoardNames[FAMILYKEYBOARD_NUM_BUTTONS];
|
||||
extern const char *DefaultFamilyKeyBoardDevice;
|
||||
extern const int DefaultFamilyKeyBoard[FAMILYKEYBOARD_NUM_BUTTONS];
|
||||
|
||||
#endif
|
||||
|
|
|
@ -160,14 +160,14 @@ FCEUD_NetworkConnect(void)
|
|||
puts("*** Sending initialization data to server...");
|
||||
uint8 *sendbuf;
|
||||
uint8 buf[5];
|
||||
uint32 sblen, data;
|
||||
uint32 sblen;
|
||||
|
||||
sblen = 4 + 16 + 16 + 64 + 1 + username.size();
|
||||
sendbuf = (uint8 *)malloc(sblen);
|
||||
memset(sendbuf, 0, sblen);
|
||||
|
||||
// XXX soules - should use htons instead of en32() from above!
|
||||
//data = htons(sblen - 4);
|
||||
//uint32 data = htons(sblen - 4);
|
||||
//memcpy(sendbuf, &data, sizeof(data));
|
||||
en32(sendbuf, sblen - 4);
|
||||
|
||||
|
|
|
@ -821,9 +821,9 @@ char *FCEU_MakeFName(int type, int id1, char *cd1)
|
|||
case FCEUMKF_GGROM:asprintf(&ret,"%s"PSS"gg.rom",BaseDirectory);break;
|
||||
case FCEUMKF_FDSROM:
|
||||
if(odirs[FCEUIOD_FDSROM])
|
||||
asprintf(&ret,"%s"PSS"disksys.rom",odirs[FCEUIOD_FDSROM],FileBase);
|
||||
asprintf(&ret,"%s"PSS"disksys.rom",odirs[FCEUIOD_FDSROM]);
|
||||
else
|
||||
asprintf(&ret,"%s"PSS"disksys.rom",BaseDirectory,FileBase);
|
||||
asprintf(&ret,"%s"PSS"disksys.rom",BaseDirectory);
|
||||
break;
|
||||
case FCEUMKF_PALETTE:asprintf(&ret,"%s"PSS"%s.pal",BaseDirectory,FileBase);break;
|
||||
case FCEUMKF_MOVIEGLOB:
|
||||
|
|
|
@ -545,8 +545,8 @@ static void CommandStateSave(void);
|
|||
static void CommandSelectSaveSlot(void);
|
||||
static void CommandEmulationSpeed(void);
|
||||
// static void CommandMovieSelectSlot(void);
|
||||
static void CommandMovieRecord(void);
|
||||
static void CommandMovieReplay(void);
|
||||
//static void CommandMovieRecord(void);
|
||||
//static void CommandMovieReplay(void);
|
||||
static void CommandSoundAdjust(void);
|
||||
static void CommandUsePreset(void);
|
||||
static void ViewSlots(void);
|
||||
|
@ -753,7 +753,7 @@ static void CommandStateLoad(void)
|
|||
FCEUI_LoadState(0);
|
||||
}
|
||||
|
||||
static void CommandMovieRecord(void)
|
||||
/*static void CommandMovieRecord(void)
|
||||
{
|
||||
FCEUI_SaveMovie(0, 0);
|
||||
}
|
||||
|
@ -761,7 +761,7 @@ static void CommandMovieRecord(void)
|
|||
static void CommandMovieReplay(void)
|
||||
{
|
||||
FCEUI_LoadMovie(0, 0, 0);
|
||||
}
|
||||
}*/
|
||||
|
||||
static void CommandSoundAdjust(void)
|
||||
{
|
||||
|
|
|
@ -31,10 +31,10 @@ private:
|
|||
public:
|
||||
|
||||
memory_streambuf()
|
||||
: length(0)
|
||||
: buf(new T[capacity = 128])
|
||||
, myBuf(true)
|
||||
, length(0)
|
||||
, ww(0)
|
||||
, buf(new T[capacity = 128])
|
||||
, usevec(0)
|
||||
{
|
||||
sync();
|
||||
|
@ -42,9 +42,9 @@ public:
|
|||
|
||||
//constructs a non-expandable streambuf around the provided buffer
|
||||
memory_streambuf(T* usebuf, int buflength)
|
||||
: length(buflength)
|
||||
: buf(usebuf)
|
||||
, myBuf(false)
|
||||
, buf(usebuf)
|
||||
, length(buflength)
|
||||
, ww(0)
|
||||
, usevec(0)
|
||||
{
|
||||
|
@ -53,11 +53,11 @@ public:
|
|||
|
||||
//constructs an expandable streambuf around the provided buffer
|
||||
memory_streambuf(std::vector<T>* _usevec)
|
||||
: usevec(_usevec)
|
||||
, length(_usevec->size())
|
||||
, capacity(_usevec->size())
|
||||
: capacity(_usevec->size())
|
||||
, myBuf(false)
|
||||
, length(_usevec->size())
|
||||
, ww(0)
|
||||
, usevec(_usevec)
|
||||
{
|
||||
if(length>0)
|
||||
buf = &(*_usevec)[0];
|
||||
|
|
Loading…
Reference in New Issue