izissise / PFA

Tek3 End of Year's Project
GNU General Public License v3.0
0 stars 0 forks source link

std::chrono weirdness #2

Closed izissise closed 9 years ago

izissise commented 9 years ago

If one does this:

TimeHandling time(std::chrono::milliseconds(1000 /std::stoi(_set.getCvarList().getCvar("com_gameFps"))));
time.start();

It would compile.

But this:

int mpl = 1000 /std::stoi(_set.getCvarList().getCvar("com_gameFps"));
TimeHandling time(std::chrono::milliseconds(mpl));
time.start();

wouldn't.

Does someone know why ?

izissise commented 9 years ago

here the question on so: https://stackoverflow.com/questions/25687384/stdchrono-doesnt-work-if-passing-a-variable

izissise commented 9 years ago

Resolve by so people ;)