Commit Graph

12 Commits

Author SHA1 Message Date
Cosmin Truta
ceb327789b Remove top-level const from function-scope variables
As per the const correctness rules, top-level const-ness of data
in automatic scopes does not propagate outside of these scopes
(unlike const-ness at lower levels, such as pointers to const data).

Previously, const was used liberally, but inconsistently across the
libpng codebase. Using const wherever applicable is not incorrect.
However, _consistent_ use of const is difficult to maintain in such
conditions.

In conclusion, we shall continue to use const only where doing so is
strictly necessary:

1. If a function guarantees that it will not modify an argument
   passed by pointer, the corresponding function parameter should be
   a pointer-to-const (const T *).

2. Static data should not be modified, therefore it should be const.

Reference:
Google C++ Style Guide
https://google.github.io/styleguide/cppguide.html#Use_of_const
2018-08-18 22:47:16 -04:00
Glenn Randers-Pehrson
0e06b5948c [libpng16] Imported from libpng-1.6.35beta01.tar 2018-03-06 14:06:24 -06:00
Glenn Randers-Pehrson
d42e88d5b3 [libpng16] Imported from libpng-1.6.29.tar 2017-03-16 07:26:33 -05:00
Glenn Randers-Pehrson
b475d0593c [libpng16] Update credits and copyright information about powerpc-vsx code 2017-02-22 15:14:22 -06:00
Vadim Barkov
8a242668fd Added warning with supported OSes list for VSX check 2017-02-01 14:26:02 +00:00
Vadim Barkov
b42e8bce3a Added PNG_UNUSED macro in contrib/powerpc/linux{_aux}.c 2017-02-01 14:03:57 +00:00
Vadim Barkov
b1be78460a Fixed mixed tabs and spaces in contrib/powerpc/linux_aux.c 2017-02-01 13:58:54 +00:00
Vadim Barkov
d57bed7838 Fixed mixed tabs and spacing and comments in contrib/powerpc/linux.c 2017-02-01 13:57:50 +00:00
Vadim Barkov
f2b829166d Removed commentary about contrib/powerpc/READM 2017-01-31 12:13:39 +00:00
Vadim Barkov
80041d15b2 Update contrib/powerpc/linux_aux.c header 2017-01-31 15:07:14 +03:00
Vadim Barkov
bea573d370 Added auxv-based VSX detection method for PowerPC and enabled it by default 2017-01-31 11:59:11 +00:00
Vadim Barkov
ee5804fa14 Added PowerPC detection code for linux 2017-01-14 16:47:10 +03:00