pl_mpeg
pl_mpeg copied to clipboard
Modify public struct typedefs to enable fwd declaration in C++
It would be helpful to change
typedef struct {
...
} plm_frame_t;
into
typedef struct plm_frame_t {
...
} plm_frame_t;
This would make it easier to forward-declare the structs in a C++ header without including pl_mpeg.h from there, exposing it to the rest of the program.
Example my.hpp:
struct plm_frame_t; // trying to not include pl_mpeg.h here
class MyClass {
public:
void render( plm_frame_t *frame );
};
Example my.cpp:
#include "my.hpp"
#define PL_MPEG_IMPLEMENTATION
#include "pl_mpeg.h"
MyClass::render( plm_frame_t *frame ) {
...
}