Skip to content
Snippets Groups Projects
Commit 66dbfc6a authored by Wesley W. Terpstra's avatar Wesley W. Terpstra
Browse files

The C++ and C API had their parameters flipped respectively.

Be consistent!
parent bf9c51d9
No related merge requests found
...@@ -552,7 +552,7 @@ class Device { ...@@ -552,7 +552,7 @@ class Device {
eb_device_t device; eb_device_t device;
friend class Cycle; friend class Cycle;
template <typename T, void (T::*cb)(Operation, Device, status_t)> template <typename T, void (T::*cb)(Device, Operation, status_t)>
friend void proxy_cb(T* object, eb_device_t dev, eb_operation_t op, eb_status_t status); friend void proxy_cb(T* object, eb_device_t dev, eb_operation_t op, eb_status_t status);
}; };
...@@ -604,14 +604,14 @@ class Operation { ...@@ -604,14 +604,14 @@ class Operation {
eb_operation_t operation; eb_operation_t operation;
template <typename T, void (T::*cb)(Operation, Device, status_t)> template <typename T, void (T::*cb)(Device, Operation, status_t)>
friend void proxy_cb(T* object, eb_device_t dev, eb_operation_t op, eb_status_t status); friend void proxy_cb(T* object, eb_device_t dev, eb_operation_t op, eb_status_t status);
}; };
/* Convenience templates to convert member functions into callback type */ /* Convenience templates to convert member functions into callback type */
template <typename T, void (T::*cb)(Operation, Device, status_t)> template <typename T, void (T::*cb)(Device, Operation, status_t)>
inline void proxy_cb(T* object, eb_device_t dev, eb_operation_t op, eb_status_t status) { inline void proxy_cb(T* object, eb_device_t dev, eb_operation_t op, eb_status_t status) {
return (object->*cb)(Operation(op), Device(dev), status); return (object->*cb)(Device(dev), Operation(op), status);
} }
/****************************************************************************/ /****************************************************************************/
......
...@@ -204,10 +204,10 @@ public: ...@@ -204,10 +204,10 @@ public:
int* success; int* success;
void launch(Device device, int length, int* success); void launch(Device device, int length, int* success);
void complete(Operation op, Device dev, status_t status); void complete(Device dev, Operation op, status_t status);
}; };
void TestCycle::complete(Operation op, Device dev, status_t status) { void TestCycle::complete(Device dev, Operation op, status_t status) {
#ifndef EB_TEST_TCP #ifndef EB_TEST_TCP
if (status == EB_OVERFLOW) { if (status == EB_OVERFLOW) {
if (loud) printf("Skipping overflow cycle\n"); if (loud) printf("Skipping overflow cycle\n");
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment