Commit Graph

705 Commits

Author SHA1 Message Date
Lioncash 0622ada766 Types: Qualify std types with std::
Same behavior, but more proper from a type header point of view.
2019-08-24 02:33:43 -04:00
Lioncash f669191fcb Types: Remove unnecessary macros
These appear to be unused, and, with C++17, can be superseded with
[[maybe_unused]] and [[deprecated]] attributes
2019-08-24 02:31:10 -04:00
Lioncash 8471a7e189 Types: Simplify typedefs
These can just be regular structure declarations. This also has the
benefit of allowing forward declaring the types.
2019-08-24 02:29:37 -04:00
Phillip Stephens 5da7e7bac3
Merge pull request #49 from lioncash/doc
General: Silence -Wdocumentation warnings
2019-08-16 18:18:23 -07:00
Phillip Stephens 1fc1c9eab3
Merge pull request #48 from lioncash/lz
LZBase/LZLookupTable: Minor cleanup
2019-08-16 18:18:14 -07:00
Lioncash 5140e9e7eb General: Silence -Wdocumentation warnings
Resolves trivial Doxygen reference warnings uncovered with
-Wdocumentation
2019-08-16 00:40:29 -04:00
Lioncash c524a9caa2 LZLookupTable: Remove unused <deque> include
This header and the matching cpp file make no use of std::deque, so this
can be removed.
2019-08-15 23:54:04 -04:00
Lioncash a3a6e3b42a LZLookupTable: Reuse setLookAheadWindow within constructor
Provides the same behavior without duplicating code.
2019-08-15 23:48:49 -04:00
Lioncash 70aeed342f LZLookupTable: Convert typedef into a using alias 2019-08-15 23:47:06 -04:00
Lioncash f7b8c33ed2 LZLookupTable: Default-initialize class members directly in the class
Same thing without the need to duplicate the variable name.
2019-08-15 23:45:17 -04:00
Lioncash 3092dc79e7 LZLookupTable: Default destructor 2019-08-15 23:41:10 -04:00
Lioncash 663696fe72 LZLookupTable: Make member functions const where applicable
While we're at it, we can convert compare_equal into an operator==
operator!= pair, and make the curPos argument to search() const as well.
2019-08-15 23:39:45 -04:00
Lioncash 48ae0d32fe LZBase: Remove unused <string> include 2019-08-15 23:35:16 -04:00
Lioncash 50936ab1a9 LZBase: Default virtual destructor 2019-08-15 23:35:12 -04:00
Phillip Stephens 8506e3236c
Merge pull request #47 from lioncash/ostream
Global: Change <iostream> include into <ostream>
2019-08-15 20:34:04 -07:00
Lioncash be9ac57b9d LZBase: Mark functions as const where applicable
Most of the interface can be const qualified except for the setters.
While we're at it, we can also make the private member functions
internally linked helper functions, given they don't depend on instance
state at all.
2019-08-15 23:28:41 -04:00
Lioncash d36b7bdc3f Global: Change <iostream> include into <ostream>
<iostream> injects a static constructor into every translation unit that
includes the header--even if nothing from the header is used. This can
result in minor initial program slowdown, as all of these constructors
need to run before main() can execute.

Instead, we can use <ostream>, which includes all of the necessary
machinery that we need.
2019-08-15 20:06:17 -04:00
Phillip Stephens 2f5dbc11ed
Merge pull request #46 from lioncash/inline
General: Minor general cleanup
2019-08-15 15:28:44 -07:00
Lioncash 54b1e8f836 General: Use nullptr where applicable
Uses nullptr instead of NULL or the 0 integer literal where applicable.
2019-08-15 16:12:17 -04:00
Lioncash d735ed45db General: Use the override keyword where applicable 2019-08-15 16:12:17 -04:00
Lioncash 5657bd7f2f General: Remove unnecessary typename specifiers 2019-08-15 16:12:14 -04:00
Lioncash 919a74c72c General: Remove unnecessary usages of inline
Functions defined directly in a class definition are already inline by
default.

Non-specialized templates are also inline by default.
2019-08-15 16:07:47 -04:00
Phillip Stephens 40d7396f22
Merge pull request #45 from libAthena/revert-42-inline
Revert "General: Minor general cleanup"
2019-08-15 08:53:06 -07:00
Phillip Stephens af59ea2d48
Revert "General: Minor general cleanup" 2019-08-15 08:52:45 -07:00
Phillip Stephens 4af15d46c9
Merge pull request #44 from lioncash/simplify
IStreamReader/IStreamWriter: Simplify buffer functions where applicable
2019-08-15 08:40:02 -07:00
Phillip Stephens 97db908b3d
Merge pull request #43 from lioncash/str
DNAYaml: Replace implementation-specific functions with standardized equivalents
2019-08-15 08:39:32 -07:00
Phillip Stephens 5973db475c
Merge pull request #42 from lioncash/inline
General: Minor general cleanup
2019-08-15 08:39:13 -07:00
Lioncash 831b2ffdb6 IStreamReader/IStreamWriter: Simplify buffer functions where applicable
We can simply use std::make_unique instead of raw new + memset. For
fill(), we can just use std::vector, given one of its constructors
allows for an initial value to be specified.
2019-08-15 11:31:50 -04:00
Lioncash 407c9cfab5 DNAYaml: Replace implementation-specific functions with standardized equivalents 2019-08-15 11:18:47 -04:00
Lioncash 83818a6272 General: Use nullptr where applicable
Uses nullptr instead of NULL or the 0 integer literal where applicable.
2019-08-15 11:04:09 -04:00
Lioncash 8e22dda880 General: Use the override keyword where applicable 2019-08-15 10:56:26 -04:00
Phillip Stephens f9205876f0
Merge pull request #41 from lioncash/make
DNAYaml: Minor cleanup
2019-08-15 07:48:20 -07:00
Lioncash 4b7917cc05 General: Remove unnecessary typename specifiers 2019-08-15 10:31:04 -04:00
Lioncash 60c554f67e General: Remove unnecessary usages of inline
Functions defined directly in a class definition are already inline by
default.

Non-specialized templates are also inline by default.
2019-08-15 09:24:50 -04:00
Lioncash c3d19a8aab DNAYaml: Make is_base64() internally linked
This isn't used outside of this translation unit, so it can be made
static.
2019-08-15 08:29:07 -04:00
Lioncash 9fc76a7dea DNAYaml: Use std::string_view instead of std::string for base64 characters
Eliminates a runtime static constructor that needs to execute. Also gets
rid of a heap allocation.
2019-08-15 08:09:41 -04:00
Lioncash ee5b894537 DNAYaml: Get rid of trivial uses of goto
We can just wrap the handling within a lambda function and then execute
it on the error paths.
2019-08-15 08:06:52 -04:00
Lioncash 46a847e885 DNAYaml: Make use of std::make_unique where applicable
Gets rid of a few places of raw new where it can be trivially avoided.
2019-08-15 07:49:55 -04:00
Phillip Stephens 0532b38059 Fixes for `override` support 2019-08-10 17:46:14 -07:00
Jack Andersen ffbd1a0bcd Windows build fixes 2019-07-27 15:18:57 -10:00
Jack Andersen 0ada695c7a Make simd_floats use std::array for storage 2019-07-20 22:41:46 -10:00
Jack Andersen 478d75f1cb Massive fmtlib refactor 2019-07-19 18:19:44 -10:00
Jack Andersen f3852eb0d2 Remove GXXDEBUG macro from atdna compilation 2019-07-06 22:21:13 -10:00
Jack Andersen 335ed6bb6f Update lzokay 2019-06-14 14:37:14 -10:00
Jack Andersen a9271862dc Ensure athena has zlib include directory available 2019-06-12 15:29:18 -10:00
Jack Andersen 727f057fa7 GCC fixes and better CMake dependency handling 2019-06-11 15:58:44 -10:00
Jack Andersen 9bbd7af9f6 Minor cmake tweak 2019-05-07 17:45:28 -10:00
Jack Andersen b9de854400 Ensure stream readers zero-initialize their return values 2019-04-06 18:44:50 -10:00
Jack Andersen b40d3b17e5 Add True and False tests for bitwise enums 2019-04-02 18:28:05 -10:00
Jack Andersen 0b3fd2b5af Bug fix for Win7 2019-03-23 22:05:17 -10:00