Why is everything in OkapiLib a pointer?

I’m looking at OkapiLib and everything uses → instead of the . that everything else seems to use, my question is: why?

I don’t know specifically why in OkapiLib but in general passing pointers in C/C++ is more efficient than passing the entire data structure. Normally the pointer is just a single “word” so it can be referenced in a memory location or a value on the parameter stack.

Pointers are the lifeblood of C (and other languages). Knowing how to use them is a must.

2 Likes

Not everything. Just the drive chassis.