simple coding question

I'm trying to figure out what this code means. Here's the code I'll explain :

1
2
3
4
5
6
7
8
9
10
11
12
13
14
void CvMapGenerator::setPlotTypes(const int* paiPlotTypes)
{
  CvPlot* pLoopPlot;
  int iNumPlots;

  iNumPlots = GC.getMapINLINE().numPlotsINLINE();

  for (int iI = 0; iI < iNumPlots; iI++)
  {
    gDLL->callUpdater();
    GC.getMapINLINE().plotByIndexINLINE(iI)->setPlotType(((PlotTypes)(paiPlotTypes[iI])), false, false);
  }

(...)


In fact I don't understand that part

GC.getMapINLINE().plotByIndexINLINE(iI)->setPlotType(((PlotTypes)(paiPlotTypes[iI])), false, false);

function setPlotType() is called with parameters ((PlotTypes)(paiPlotTypes[iI]), false, false

What does the (PlotTypes) behind (paiPlotTypes[iI]) has to do in there?

is this type casting?

thank you in advance -- :-) -- AeonFlux1212
Last edited on

is this type casting?

Yes. paiPlotTypes[iI] is being cast to PlotTypes.
ok thank you... :-)
Topic archived. No new replies allowed.