mirror of
https://github.com/PretendoNetwork/Inkay.git
synced 2026-07-15 08:01:00 -05:00
miiverse extra load times gone from 15 seconds to 2 seconds, though that's mostly because I changed the search range 😎
29 lines
1.2 KiB
C++
29 lines
1.2 KiB
C++
/* Copyright 2023 Pretendo Network contributors <pretendo.network>
|
|
Copyright 2023 Ash Logan <ash@heyquark.com>
|
|
Copyright 2019 Maschell
|
|
|
|
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby
|
|
granted, provided that the above copyright notice and this permission notice appear in all copies.
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
|
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
|
|
IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
PERFORMANCE OF THIS SOFTWARE.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <cstdint>
|
|
#include <cstddef>
|
|
#include <span>
|
|
|
|
bool replace(uint32_t start, uint32_t size, const char* original_val, size_t original_val_sz, const char* new_val, size_t new_val_sz);
|
|
|
|
struct replacement {
|
|
std::span<const uint8_t> orig;
|
|
std::span<const uint8_t> repl;
|
|
};
|
|
|
|
void replaceBulk(uint32_t start, uint32_t size, std::span<const replacement> replacements);
|