assignemnts
unnecessary string casts
Only copy the entry vector when necessary
Revert "unnecessary string casts"

This reverts commit a21be2a847647fd64ed4206a962e0b3bd7c2af94.
cmSourceFileLocation: Avoid string allocation in extension checking

The substr call was causing excess allocations. Swap the cheaper
character check to be before the longer string comparison, now using the
prefix checking function.