updates in  loc, and clang build fixed

updates in  loc, and clang build fixed.
Only graphcut unit test fails with clang