tbeu / matio

MATLAB MAT File I/O Library
https://matio.sourceforge.io
BSD 2-Clause "Simplified" License
334 stars 97 forks source link

Convert to pragma once. #72

Closed papadop closed 6 years ago

papadop commented 6 years ago

Simple change to convert .h files to #pragma once. All modern C compilers I know support this. But there is the Portland compiler that matio seems to support (I'm not sure how many builds are made with this compiler). https://en.wikipedia.org/wiki/Pragma_once Anyway, I'm putting this here for reference. All test pass.

coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 81.008% when pulling eb739917762f91ee18606fffa3cc17331290e72a on papadop:PragmaOnce into c9fa3a2029bed44fdf37eb4de8413521f635e3dc on tbeu:master.

tbeu commented 6 years ago

There is no real need/requirement to change this and being conservative I'd prefer to leave it as it is, i.e., not to merge. OK for you? See also https://stackoverflow.com/questions/1143936/pragma-once-vs-include-guards.

papadop commented 6 years ago

Yes. This is OK. A in the stackoverflow comment, I tend to prefer pragma once over standard include guard as they are less error prone and less verbose. It was easy to do and I did it on the side of the cmake port (by the way compilation works, I need to do some work to on tests, I'll publish a PR - just for comments -- soon). I discovered only after the fact that PGI compilers do not support it (and they are the only ones, which is a shame.....).

tbeu commented 6 years ago

Agreement to close without merge.