State-free chai graphics wrapper

Issue #189 new
Samir Menon repo owner created an issue

The init function that supports local memory caching should be disabled.

I.e., This function should die:

CGraphicsChai.h/cpp

  virtual sBool initGraphics(
      const SGraphicsParsed* arg_gr_ds)
  {
    SGraphicsChai *tmp = new SGraphicsChai();
    bool flag = initGraphics(arg_gr_ds,tmp);
    if(flag){ data_is_mine_ = true; }
    else{ delete tmp; }
    return flag;
  }

Instead, we should exclusively use:

  virtual sBool initGraphics(
      const SGraphicsParsed* arg_gr_ds,
      SGraphicsChai* arg_chai_ds);

This will make the code more transparent.

Comments (1)

  1. Log in to comment