Skip to main content
13 events
when toggle format what by license comment
Apr 28, 2018 at 23:14 comment added Loki Astari @JDługosz You can believe all you like it does not make anything true :-) There is no guarantees that the ABI of a C free standing function is the same as a C++ static member function.
Apr 28, 2018 at 20:25 comment added JDługosz I believe a static member function is exactly like a free function in terms of being able to make a pointer to a function handle them. The ABI difference (if any) would have to do with the calling convention — I assume you mean that the extern "C" function uses the proper convention by default if that differs from the one used by C++ functions.
Jan 4, 2012 at 0:45 comment added Loki Astari This call can fail: pthread_create(&m_render_thread, NULL, create_pthread, this); You should check for failure and act appropriately.
Jan 4, 2012 at 0:45 comment added Loki Astari If the call to if (initialize_window(width, height)) I don't see any clean up code to remove the resources (Bad habbit to get into).
Jan 4, 2012 at 0:42 comment added Loki Astari You may as well drop the use of inline it has no use. The compiler will inline the functions as its sees fit. You trying to tell the compiler what to inline will be ignored the compiler, as it is much better at it (and it knows it, and will silently ignores all your suggestions).
Jan 4, 2012 at 0:40 comment added Loki Astari Hate your main(). There is no need to call a create method. Just create an object. If it works then you just use it. If it fails it throws an exception and you print an error.
Jan 3, 2012 at 20:43 comment added Matthew Hoggan Loki thanks again for your wonderful input, I have slightly altered the code. I did less wrapping than you suggest but I think it is getting better. What are your thoughts?
Jan 3, 2012 at 19:29 history edited Loki Astari CC BY-SA 3.0
added 13497 characters in body
Jan 3, 2012 at 17:22 vote accept Matthew Hoggan
Jan 3, 2012 at 11:25 history edited Loki Astari CC BY-SA 3.0
added 157 characters in body
Jan 3, 2012 at 11:19 history edited Loki Astari CC BY-SA 3.0
added 1566 characters in body
Jan 3, 2012 at 10:15 history edited Loki Astari CC BY-SA 3.0
added 3253 characters in body
Jan 3, 2012 at 8:38 history answered Loki Astari CC BY-SA 3.0