1

I'm new to C++, so please take this lightly. I was using resharper to convert some code from c-style casts to c++ style casts.

This code here:

(unsigned int)(ch - start) <= (unsigned int)(end - start);

Was changed to

static_cast<unsigned>(ch - start) <= static_cast<unsigned>(end - start);

instead of:

static_cast<unsigned int>(ch - start) <= static_cast<unsigned int>(end - start);

Is there ANY difference? And also, is there any peformance differences? This is called billions of times.

ABCD Man
  • 79
  • 4

1 Answers1

1

Is there ANY difference?

unsigned int has 4 more characters than unsigned. There are no other differences.

And also, is there any peformance differences?

No.

eerorika
  • 232,697
  • 12
  • 197
  • 326