Style fixes

This commit is contained in:
Stefano Ceccherini
2014-09-21 19:21:34 +02:00
parent 94bfc1f561
commit b2e8d9627a
4 changed files with 10 additions and 15 deletions
+1 -1
View File
@@ -27,7 +27,7 @@ using namespace BPrivate;
status_t status_t
_run_thread(void* data) _run_thread(void* data)
{ {
BMidi* midi = (BMidi*) data; BMidi* midi = (BMidi*)data;
midi->Run(); midi->Run();
midi->fIsRunning = false; midi->fIsRunning = false;
return 0; return 0;
+3 -6
View File
@@ -21,8 +21,7 @@
namespace BPrivate { namespace BPrivate {
class BMidiGlue: public BMidiLocalConsumer class BMidiGlue: public BMidiLocalConsumer {
{
public: public:
BMidiGlue(BMidi* midiObject, const char* name = NULL); BMidiGlue(BMidi* midiObject, const char* name = NULL);
@@ -60,12 +59,11 @@ public:
virtual void TempoChange(int32 beatsPerMinute, bigtime_t time); virtual void TempoChange(int32 beatsPerMinute, bigtime_t time);
private: private:
BMidi* fMidiObject; BMidi* fMidiObject;
}; };
class BMidiPortGlue: public BMidiLocalConsumer
{ class BMidiPortGlue: public BMidiLocalConsumer {
public: public:
BMidiPortGlue(BMidiPort* midiObject, const char* name = NULL); BMidiPortGlue(BMidiPort* midiObject, const char* name = NULL);
@@ -103,7 +101,6 @@ public:
virtual void TempoChange(int32 beatsPerMinute, bigtime_t time); virtual void TempoChange(int32 beatsPerMinute, bigtime_t time);
private: private:
BMidiPort* fMidiObject; BMidiPort* fMidiObject;
}; };
+6 -6
View File
@@ -72,17 +72,17 @@ BMidiPort::Open(const char* name)
Close(); Close();
for (int32 t = 0; t < fDevices->CountItems(); ++t) { for (int32 t = 0; t < fDevices->CountItems(); ++t) {
BMidiEndpoint* endp = (BMidiEndpoint*) fDevices->ItemAt(t); BMidiEndpoint* endp = (BMidiEndpoint*)fDevices->ItemAt(t);
if (strcmp(name, endp->Name()) != 0) if (strcmp(name, endp->Name()) != 0)
continue; continue;
if (!endp->IsValid()) // still exists? if (!endp->IsValid()) // still exists?
continue; continue;
if (endp->IsProducer()) { if (endp->IsProducer()) {
if (fRemoteSource == NULL) if (fRemoteSource == NULL)
fRemoteSource = (BMidiProducer*) endp; fRemoteSource = (BMidiProducer*)endp;
} else { } else {
if (fRemoteSink == NULL) { if (fRemoteSink == NULL) {
fRemoteSink = (BMidiConsumer*) endp; fRemoteSink = (BMidiConsumer*)endp;
fLocalSource->Connect(fRemoteSink); fLocalSource->Connect(fRemoteSink);
} }
} }
@@ -242,7 +242,7 @@ BMidiPort::CountDevices()
status_t status_t
BMidiPort::GetDeviceName(int32 n, char* name, size_t bufSize) BMidiPort::GetDeviceName(int32 n, char* name, size_t bufSize)
{ {
BMidiEndpoint* endp = (BMidiEndpoint*) fDevices->ItemAt(n); BMidiEndpoint* endp = (BMidiEndpoint*)fDevices->ItemAt(n);
if (endp == NULL) if (endp == NULL)
return B_BAD_VALUE; return B_BAD_VALUE;
@@ -282,7 +282,7 @@ BMidiPort::ScanDevices()
bool addItem = true; bool addItem = true;
for (int32 t = 0; t < fDevices->CountItems(); ++t) { for (int32 t = 0; t < fDevices->CountItems(); ++t) {
BMidiEndpoint* other = (BMidiEndpoint*) fDevices->ItemAt(t); BMidiEndpoint* other = (BMidiEndpoint*)fDevices->ItemAt(t);
if (strcmp(endp->Name(), other->Name()) == 0) { if (strcmp(endp->Name(), other->Name()) == 0) {
addItem = false; addItem = false;
break; break;
@@ -302,7 +302,7 @@ void
BMidiPort::EmptyDeviceList() BMidiPort::EmptyDeviceList()
{ {
for (int32 t = 0; t < fDevices->CountItems(); ++t) for (int32 t = 0; t < fDevices->CountItems(); ++t)
((BMidiEndpoint*) fDevices->ItemAt(t))->Release(); ((BMidiEndpoint*)fDevices->ItemAt(t))->Release();
fDevices->MakeEmpty(); fDevices->MakeEmpty();
} }
-2
View File
@@ -29,9 +29,7 @@
BSamples::BSamples() BSamples::BSamples()
{ {
if (be_synth == NULL) if (be_synth == NULL)
{
new BSynth(); new BSynth();
}
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------