• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

shared_fooの不要ディレクトリ削除前のもの


Commit MetaInfo

Revision44ad8a73cbc6d31b743a02fe7a288378eea4dfdd (tree)
Zeit2018-03-02 21:09:44
Autortakemasa <suikan@user...>
Commitertakemasa

Log Message

Initialize buffer at DebugerFifo explicitly.

Ändern Zusammenfassung

Diff

--- a/stm32_development/murasaki/murasaki/abstractfifo.cpp
+++ b/stm32_development/murasaki/murasaki/abstractfifo.cpp
@@ -21,11 +21,6 @@ AbstractFifo::AbstractFifo(unsigned int buffer_size):
2121
2222 // set both pointer same value ( empty buffer ).
2323 tail_ = head_ = 0;
24-
25- // Clean up buffer.
26- // This is essential to outptu clear data when ReWind() is called at very initial stage.
27- ::memset(buffer_, ' ', size_of_buffer_);
28-
2924 }
3025
3126
--- a/stm32_development/murasaki/murasaki/abstractfifo.hpp
+++ b/stm32_development/murasaki/murasaki/abstractfifo.hpp
@@ -34,6 +34,7 @@ class AbstractFifo
3434 * @param buffer_size Size of the internal buffer to be allocated [byte]
3535 * @details
3636 * Allocate the internal buffer with given buffer_size.
37+ * The contents is not initialized.
3738 */
3839 AbstractFifo(unsigned int buffer_size);
3940 /**
--- a/stm32_development/murasaki/murasaki/debuggerfifo.cpp
+++ b/stm32_development/murasaki/murasaki/debuggerfifo.cpp
@@ -21,6 +21,10 @@ DebuggerFifo::DebuggerFifo(unsigned int buffer_size)
2121 sync_(new Synchronizer())
2222 {
2323 MURASAKI_ASSERT(sync_ != nullptr);
24+
25+ // Clean up buffer.
26+ // This is essential to outptu clear data when ReWind() is called at very initial stage.
27+ ::memset(buffer_, ' ', size_of_buffer_);
2428 }
2529
2630 DebuggerFifo::~DebuggerFifo()
--- a/stm32_development/murasaki/murasaki/debuggerfifo.hpp
+++ b/stm32_development/murasaki/murasaki/debuggerfifo.hpp
@@ -42,6 +42,7 @@ class DebuggerFifo : public AbstractFifo
4242 * @param buffer_size Size of the internal buffer to be allocated [byte]
4343 * @details
4444 * Allocate the internal buffer with given buffer_size.
45+ * The buffer contents is initialized by blank.
4546 */
4647 DebuggerFifo(unsigned int buffer_size);
4748 /**