Skip to content
This repository was archived by the owner on Sep 23, 2024. It is now read-only.

Commit 9b2b552

Browse files
Update MidiFileContext
1 parent aecc454 commit 9b2b552

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

MidiFileContext.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@
55
* \author WuChang
66
77
* \date Aug 2023
8-
* \version 1.2.0
8+
* \version 1.2.1
99
* \license MIT License
1010
*********************************************************************/
1111

1212
#include "MidiFileContext.h"
1313

1414
namespace DMDA {
15-
juce::MidiFile* MidiFileContext::getData() const {
15+
const juce::MidiFile* MidiFileContext::getData() const {
1616
return this->ptrData;
1717
}
1818

19-
void MidiFileContext::setData(juce::MidiFile* data) {
19+
void MidiFileContext::setData(const juce::MidiFile* data) {
2020
this->ptrData = data;
2121
}
2222

MidiFileContext.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* \author WuChang
66
77
* \date Aug 2023
8-
* \version 1.2.0
8+
* \version 1.2.1
99
* \license MIT License
1010
*********************************************************************/
1111

@@ -25,18 +25,18 @@ namespace DMDA {
2525
/**
2626
* Get the reference of the data.
2727
*/
28-
juce::MidiFile* getData() const;
28+
const juce::MidiFile* getData() const;
2929
/**
3030
* Set data.
3131
*/
32-
void setData(juce::MidiFile* data);
32+
void setData(const juce::MidiFile* data);
3333
/**
3434
* Get the reference of the read write lock.
3535
*/
3636
juce::ReadWriteLock& getLock() const;
3737

3838
private:
39-
juce::MidiFile* ptrData = nullptr;
39+
const juce::MidiFile* ptrData = nullptr;
4040
mutable juce::ReadWriteLock lock;
4141

4242
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(MidiFileContext)

0 commit comments

Comments
 (0)