Skip to content

Commit d3ea39e

Browse files
committed
Fix compiling issues on Linux
1 parent d2e9dcc commit d3ea39e

6 files changed

Lines changed: 28 additions & 28 deletions

File tree

Source/AccessClass.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
*/
2323

2424
#include "AccessClass.h"
25-
#include "Processors\GenericProcessor\GenericProcessor.h"
26-
#include "Processors\MessageCenter\MessageCenterEditor.h"
25+
#include "Processors/GenericProcessor/GenericProcessor.h"
26+
#include "Processors/MessageCenter/MessageCenterEditor.h"
2727

2828
#include "UI/UIComponent.h"
2929

Source/Plugins/BinaryWriter/BinaryRecording.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ String BinaryRecording::generateSpikeHeader(const SpikeChannel* elec)
304304
header += "';\n";
305305

306306
header += "header.num_channels = ";
307-
header += elec->getNumChannels();
307+
header += String(elec->getNumChannels());
308308
header += ";\n";
309309

310310
header += "header.sampleRate = ";
@@ -457,4 +457,4 @@ RecordEngineManager* BinaryRecording::getEngineManager()
457457
{
458458
RecordEngineManager* man = new RecordEngineManager("RAWBINARY", "Binary", &(engineFactory<BinaryRecording>));
459459
return man;
460-
}
460+
}

Source/Plugins/SpikeSorter/SpikeSorterCanvas.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ void SpikeThresholdDisplay::mouseDown(const MouseEvent& event)
492492

493493
}
494494

495-
void SpikeThresholdDisplay::plotSpike(SorterSpikePtr& spike, int electrodeNum)
495+
void SpikeThresholdDisplay::plotSpike(SorterSpikePtr spike, int electrodeNum)
496496
{
497497
spikePlots[electrodeNum]->processSpikeObject(spike);
498498

@@ -643,7 +643,7 @@ void SpikeHistogramPlot::setPCARange(float p1min, float p2min, float p1max, floa
643643
pAxes[0]->setPCARange(p1min, p2min, p1max, p2max);
644644
}
645645

646-
void SpikeHistogramPlot::processSpikeObject(SorterSpikePtr& s)
646+
void SpikeHistogramPlot::processSpikeObject(SorterSpikePtr s)
647647
{
648648
const ScopedLock myScopedLock(mut);
649649
if (nWaveAx > 0)
@@ -911,7 +911,7 @@ GenericDrawAxes::~GenericDrawAxes()
911911

912912
}
913913

914-
bool GenericDrawAxes::updateSpikeData(SorterSpikePtr& newSpike)
914+
bool GenericDrawAxes::updateSpikeData(SorterSpikePtr newSpike)
915915
{
916916
if (!gotFirstSpike)
917917
{
@@ -1068,7 +1068,7 @@ void WaveformAxes::setRange(float r)
10681068
repaint();
10691069
}
10701070

1071-
void WaveformAxes::plotSpike(SorterSpikePtr& s, Graphics& g)
1071+
void WaveformAxes::plotSpike(SorterSpikePtr s, Graphics& g)
10721072
{
10731073

10741074
float h = getHeight();
@@ -1156,7 +1156,7 @@ void WaveformAxes::drawWaveformGrid(Graphics& g)
11561156
}
11571157

11581158

1159-
bool WaveformAxes::updateSpikeData(SorterSpikePtr& s)
1159+
bool WaveformAxes::updateSpikeData(SorterSpikePtr s)
11601160
{
11611161
if (!gotFirstSpike)
11621162
{
@@ -1179,7 +1179,7 @@ bool WaveformAxes::updateSpikeData(SorterSpikePtr& s)
11791179

11801180
}
11811181

1182-
bool WaveformAxes::checkThreshold(SorterSpikePtr& s)
1182+
bool WaveformAxes::checkThreshold(SorterSpikePtr s)
11831183
{
11841184
int sampIdx = s->getChannel()->getTotalSamples()*type;
11851185

@@ -1868,7 +1868,7 @@ void PCAProjectionAxes::paint(Graphics& g)
18681868
}
18691869

18701870

1871-
void PCAProjectionAxes::drawProjectedSpike(SorterSpikePtr& s)
1871+
void PCAProjectionAxes::drawProjectedSpike(SorterSpikePtr s)
18721872
{
18731873
if (s != nullptr && rangeSet)
18741874
{
@@ -1915,7 +1915,7 @@ void PCAProjectionAxes::setPCARange(float p1min, float p2min, float p1max, float
19151915

19161916
}
19171917

1918-
bool PCAProjectionAxes::updateSpikeData(SorterSpikePtr& s)
1918+
bool PCAProjectionAxes::updateSpikeData(SorterSpikePtr s)
19191919
{
19201920

19211921
if (spikesReceivedSinceLastRedraw < bufferSize)
@@ -2187,4 +2187,4 @@ void PCAProjectionAxes::mouseWheelMove(const MouseEvent& event, const MouseWheel
21872187
rangeDown();
21882188
else
21892189
rangeUp();
2190-
}
2190+
}

Source/Plugins/SpikeSorter/SpikeSorterCanvas.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ class SpikeThresholdDisplay : public Component
136136
void setPolygonMode(bool on);
137137
void mouseDown(const juce::MouseEvent& event);
138138

139-
void plotSpike(SorterSpikePtr& spike, int electrodeNum);
139+
void plotSpike(SorterSpikePtr spike, int electrodeNum);
140140

141141
int getTotalHeight()
142142
{
@@ -173,7 +173,7 @@ class GenericDrawAxes : public Component
173173

174174
virtual ~GenericDrawAxes();
175175

176-
virtual bool updateSpikeData(SorterSpikePtr& s);
176+
virtual bool updateSpikeData(SorterSpikePtr s);
177177

178178
void setXLims(double xmin, double xmax);
179179
void getXLims(double* xmin, double* xmax);
@@ -211,14 +211,14 @@ class WaveformAxes : public GenericDrawAxes
211211
~WaveformAxes() {}
212212

213213

214-
bool updateSpikeData(SorterSpikePtr& s);
215-
bool checkThreshold(SorterSpikePtr& spike);
214+
bool updateSpikeData(SorterSpikePtr s);
215+
bool checkThreshold(SorterSpikePtr spike);
216216

217217
void setSignalFlip(bool state);
218218
void paint(Graphics& g);
219219
void isOverUnitBox(float x, float y, int& UnitID, int& BoxID, String& where) ;
220220

221-
void plotSpike(SorterSpikePtr& s, Graphics& g);
221+
void plotSpike(SorterSpikePtr s, Graphics& g);
222222
void drawBoxes(Graphics& g);
223223

224224
void clear();
@@ -294,7 +294,7 @@ class PCAProjectionAxes : public GenericDrawAxes, Button::Listener
294294
~PCAProjectionAxes() {}
295295

296296
void setPCARange(float p1min, float p2min, float p1max, float p2max);
297-
bool updateSpikeData(SorterSpikePtr& s);
297+
bool updateSpikeData(SorterSpikePtr s);
298298
void resized();
299299
void paint(Graphics& g);
300300
void setPolygonDrawingMode(bool on);
@@ -318,19 +318,19 @@ class PCAProjectionAxes : public GenericDrawAxes, Button::Listener
318318
private:
319319
float prevx,prevy;
320320
bool inPolygonDrawingMode;
321-
void drawProjectedSpike(SorterSpikePtr& s);
321+
void drawProjectedSpike(SorterSpikePtr s);
322322

323323
bool rangeSet;
324324
SpikeSorter* processor;
325325
void updateProjectionImage(uint16_t, uint16_t, uint16_t, const uint8_t* col);
326-
void updateRange(SorterSpikePtr& s);
326+
void updateRange(SorterSpikePtr s);
327327
ScopedPointer<UtilityButton> rangeDownButton, rangeUpButton;
328328

329329
SorterSpikeArray spikeBuffer;
330330
int bufferSize;
331331
int spikeIndex;
332332
bool updateProcessor;
333-
void calcWaveformPeakIdx(SorterSpikePtr&, int, int, int*, int*);
333+
void calcWaveformPeakIdx(SorterSpikePtr, int, int, int*, int*);
334334

335335
Image projectionImage;
336336

@@ -372,7 +372,7 @@ class SpikeHistogramPlot : public Component, Button::Listener
372372
void setPCARange(float p1min, float p2min, float p1max, float p2max);
373373
void modifyRange(int index,bool up);
374374
void updateUnitsFromProcessor();
375-
void processSpikeObject(SorterSpikePtr& s);
375+
void processSpikeObject(SorterSpikePtr s);
376376

377377
SpikeSorterCanvas* canvas;
378378

Source/Processors/Events/Events.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ bool Event::createChecks(const EventChannel* channelInfo, EventChannel::EventCha
296296
if (!channelInfo) return false;
297297
if (channelInfo->getChannelType() != eventType) return false;
298298
if ((channel < 0) || (channel >= channelInfo->getNumChannels())) return false;
299-
if (!compareMetaData(channelInfo, metaData)) return nullptr;
299+
if (!compareMetaData(channelInfo, metaData)) return false;
300300
return true;
301301
}
302302

@@ -1100,4 +1100,4 @@ template PLUGIN_API BinaryEventPtr BinaryEvent::createBinaryEvent<uint32>(const
11001100
template PLUGIN_API BinaryEventPtr BinaryEvent::createBinaryEvent<int64>(const EventChannel*, int64, const int64* data, int, const MetaDataValueArray&, uint16);
11011101
template PLUGIN_API BinaryEventPtr BinaryEvent::createBinaryEvent<uint64>(const EventChannel*, int64, const uint64* data, int, const MetaDataValueArray&, uint16);
11021102
template PLUGIN_API BinaryEventPtr BinaryEvent::createBinaryEvent<float>(const EventChannel*, int64, const float* data, int, const MetaDataValueArray&, uint16);
1103-
template PLUGIN_API BinaryEventPtr BinaryEvent::createBinaryEvent<double>(const EventChannel*, int64, const double* data, int, const MetaDataValueArray&, uint16);
1103+
template PLUGIN_API BinaryEventPtr BinaryEvent::createBinaryEvent<double>(const EventChannel*, int64, const double* data, int, const MetaDataValueArray&, uint16);

Source/Processors/GenericProcessor/GenericProcessor.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ class ChannelCreationIndexes
5858
private:
5959
void clearChannelCreationCounts();
6060
int dataChannelCount{ 0 };
61-
std::unordered_map<DataChannel::DataChannelTypes, int> dataChannelTypeCount;
61+
std::unordered_map<DataChannel::DataChannelTypes, int, std::hash<int>> dataChannelTypeCount;
6262
int eventChannelCount{ 0 };
63-
std::unordered_map<EventChannel::EventChannelTypes, int> eventChannelTypeCount;
63+
std::unordered_map<EventChannel::EventChannelTypes, int, std::hash<int>> eventChannelTypeCount;
6464
int spikeChannelCount{ 0 };
65-
std::unordered_map<SpikeChannel::ElectrodeTypes, int> spikeChannelTypeCount;
65+
std::unordered_map<SpikeChannel::ElectrodeTypes, int, std::hash<int>> spikeChannelTypeCount;
6666
};
6767

6868

0 commit comments

Comments
 (0)