Commit Graph

14 Commits (0360c40e90eda9ad0cf9db3a3ee638d68d16d5bd)

Author SHA1 Message Date
Lioncash 18c1d91920
file_sys/ips_layer: Remove unnecessary reserve() call
Given 'replace' is assigned to on the following line, this isn't
necessary, given the underlying data is going to be overwritten
entirely.
6 years ago
Frederic L 7a5eda5914 global: Use std::optional instead of boost::optional (#1578)
* get rid of boost::optional

* Remove optional references

* Use std::reference_wrapper for optional references

* Fix clang format

* Fix clang format part 2

* Adressed feedback

* Fix clang format and MacOS build
7 years ago
Zach Hilman 9a87ece837 ips_layer: Use rle_size instead of data_size in RLE patch application
Prevents a potential bug when using RLE records in an IPS patch.
7 years ago
bunnei 5461b21c7a
Merge pull request #1461 from lioncash/warn
ips_layer: Silence truncation and conversion warnings
7 years ago
Lioncash 465175cdf5 ips_layer: Avoid constructing std::vector instances where not necessary
We can just compare the existing std::vector instance with a constexpr
std::array containing the desired match. This is lighter resource-wise,
as we don't need to allocate on the heap.
7 years ago
Lioncash 9ff743bc0a ips_layer: Remove unnecessary explicit std::pair constructor in std::array
Makes the layout of the array consistent, by making all elements match,
instead of special-casing the first one.
7 years ago
Lioncash f7d2889fb4 ips_layer: Add missing includes
Adds missing includes to prevent potential compilation issues in the
future. Also moves the definition of a struct into the cpp file, so that
some includes don't need to be introduced within the header.
7 years ago
Lioncash 93ac8d0fea ips_layer: std::move data within PatchIPS() and Apply()
We don't need to make a copy of the read data, so we can std::move it
into the make_shared call here.
7 years ago
Lioncash 567e818440 ips_layer: Silence truncation and conversion warnings
Makes type conversions explicit to avoid compiler warnings.
7 years ago
Zach Hilman 110d578470 ips_layer: Fix inaccuracies with comments and flags
Specifically bugs/crashes that arise when putting them in positions that are legal but not typical, such as midline, between patch data, or between patch records.
7 years ago
Zach Hilman 70bd2bb1d3 ips_layer: Deduplicate resource usage 7 years ago
Zach Hilman 9669cdb710 ips_layer: Add support for escape sequences and midline comments
More accurately follows IPSwitch specification.
7 years ago
Zach Hilman 306739c2c4 ips_layer: Add IPSwitchCompiler to process IPSwitch format 7 years ago
Zach Hilman 21b2411c44 file_sys: Implement function to apply IPS patches 7 years ago