Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest Mar 14th, 2018 64 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. // Case 1: Conditional jump in every function
  2. struct Context
  3. {
  4.   void* m_Data;
  5. };
  6.  
  7. void init(Context* ctx)
  8. {
  9.   ctx->m_Data = 0;
  10. }
  11.  
  12. void begin(Context* ctx, void* data)
  13. {
  14.   ctx->m_Data = data;
  15. }
  16.  
  17. void end(Context* ctx)
  18. {
  19.   ctx->m_Data = 0;
  20. }
  21.  
  22. void doA(Context* ctx)
  23. {
  24.   if(ctx->m_Data) {
  25.     _doA_data(ctx, ctx->m_Data);
  26.     return;
  27.   }
  28.  
  29.   // Code...
  30. }
  31.  
  32. void doB(Context* ctx, float x, float y)
  33. {
  34.   if(ctx->m_Data) {
  35.     _doB_data(ctx, ctx->m_Data, x, y);
  36.     return;
  37.   }
  38.  
  39.   // Code...
  40. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top