Fix some mostly unimportant uses of uninitialized memory
Originally committed to SVN as r6304.
This commit is contained in:
parent
2109d677a7
commit
9ac2f93bf0
4 changed files with 9 additions and 5 deletions
|
@ -147,8 +147,8 @@ void AssFile::Load(const wxString &_filename,wxString charset,bool addToRecent)
|
||||||
UndoStack.clear();
|
UndoStack.clear();
|
||||||
RedoStack.clear();
|
RedoStack.clear();
|
||||||
undoDescription.clear();
|
undoDescription.clear();
|
||||||
|
autosavedCommitId = savedCommitId = commitId + 1;
|
||||||
Commit("", COMMIT_NEW);
|
Commit("", COMMIT_NEW);
|
||||||
savedCommitId = commitId;
|
|
||||||
|
|
||||||
// Add to recent
|
// Add to recent
|
||||||
if (addToRecent) AddToRecent(filename);
|
if (addToRecent) AddToRecent(filename);
|
||||||
|
@ -161,7 +161,7 @@ void AssFile::Save(wxString filename, bool setfilename, bool addToRecent, wxStri
|
||||||
throw "Unknown file type.";
|
throw "Unknown file type.";
|
||||||
|
|
||||||
if (setfilename) {
|
if (setfilename) {
|
||||||
savedCommitId = commitId;
|
autosavedCommitId = savedCommitId = commitId;
|
||||||
this->filename = filename;
|
this->filename = filename;
|
||||||
StandardPaths::SetPathValue("?script", wxFileName(filename).GetPath());
|
StandardPaths::SetPathValue("?script", wxFileName(filename).GetPath());
|
||||||
}
|
}
|
||||||
|
@ -423,8 +423,8 @@ void AssFile::LoadDefault(bool defline) {
|
||||||
if (defline)
|
if (defline)
|
||||||
AddLine(AssDialogue().GetEntryData(), &version, &attach);
|
AddLine(AssDialogue().GetEntryData(), &version, &attach);
|
||||||
|
|
||||||
|
autosavedCommitId = savedCommitId = commitId + 1;
|
||||||
Commit("", COMMIT_NEW);
|
Commit("", COMMIT_NEW);
|
||||||
savedCommitId = commitId;
|
|
||||||
loaded = true;
|
loaded = true;
|
||||||
StandardPaths::SetPathValue("?script", "");
|
StandardPaths::SetPathValue("?script", "");
|
||||||
FileOpen("");
|
FileOpen("");
|
||||||
|
|
|
@ -79,7 +79,10 @@ size_t AudioRendererBitmapCacheBitmapFactory::GetBlockSize() const
|
||||||
|
|
||||||
|
|
||||||
AudioRenderer::AudioRenderer()
|
AudioRenderer::AudioRenderer()
|
||||||
: cache_bitmap_width(32) // arbitrary value for now
|
: pixel_samples(0)
|
||||||
|
, pixel_height(0)
|
||||||
|
, amplitude_scale(0)
|
||||||
|
, cache_bitmap_width(32) // arbitrary value for now
|
||||||
, cache_bitmap_maxsize(0)
|
, cache_bitmap_maxsize(0)
|
||||||
, cache_renderer_maxsize(0)
|
, cache_renderer_maxsize(0)
|
||||||
, renderer(0)
|
, renderer(0)
|
||||||
|
|
|
@ -279,7 +279,7 @@ protected:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/// @brief Constructor
|
/// @brief Constructor
|
||||||
AudioRendererBitmapProvider() : provider(0), pixel_samples(0) { };
|
AudioRendererBitmapProvider() : provider(0), pixel_samples(0), amplitude_scale(0) { };
|
||||||
|
|
||||||
/// @brief Destructor
|
/// @brief Destructor
|
||||||
virtual ~AudioRendererBitmapProvider() { }
|
virtual ~AudioRendererBitmapProvider() { }
|
||||||
|
|
|
@ -911,6 +911,7 @@ void BaseGrid::SetColumnWidths() {
|
||||||
colWidth[6] = effectLen;
|
colWidth[6] = effectLen;
|
||||||
for (int i = 0; i < 3; i++)
|
for (int i = 0; i < 3; i++)
|
||||||
colWidth[i + 7] = showMargin[i] ? marginLen : 0;
|
colWidth[i + 7] = showMargin[i] ? marginLen : 0;
|
||||||
|
colWidth[10] = 1;
|
||||||
|
|
||||||
// Hide columns
|
// Hide columns
|
||||||
for (int i = 0; i < columns; i++) {
|
for (int i = 0; i < columns; i++) {
|
||||||
|
|
Loading…
Reference in a new issue