remove all raw char type ref in code

This commit is contained in:
2023-09-17 10:38:46 +08:00
parent 23da6c9e3e
commit 230b18c0ba
17 changed files with 105 additions and 95 deletions

View File

@ -12,8 +12,8 @@ namespace LibCmo::VxMath {
void VxCopyStructure(CKDWORD Count, void* Dst, CKDWORD OutStride, CKDWORD SizeSrc, const void* Src, CKDWORD InStride) {
if (Dst == nullptr || Src == nullptr) return;
char* cdst = reinterpret_cast<char*>(Dst);
const char* csrc = reinterpret_cast<const char*>(Src);
CKBYTE* cdst = static_cast<CKBYTE*>(Dst);
const CKBYTE* csrc = static_cast<const CKBYTE*>(Src);
for (CKDWORD i = 0; i < Count; ++i) {
std::memcpy(cdst, csrc, SizeSrc);
cdst += OutStride;

View File

@ -3,7 +3,7 @@
namespace LibCmo::VxMath {
VxMemoryMappedFile::VxMemoryMappedFile(const char* u8_filepath) :
VxMemoryMappedFile::VxMemoryMappedFile(CKSTRING u8_filepath) :
// init members
#if defined(LIBCMO_OS_WIN32)
m_hFile(NULL), m_hFileMapping(NULL), m_hFileMapView(NULL),

View File

@ -40,7 +40,7 @@ namespace LibCmo::VxMath {
size_t m_cbFile;
bool m_bIsValid;
public:
VxMemoryMappedFile(const char* u8_filepath);
VxMemoryMappedFile(CKSTRING u8_filepath);
VxMemoryMappedFile(const VxMemoryMappedFile&) = delete;
VxMemoryMappedFile& operator=(const VxMemoryMappedFile&) = delete;
~VxMemoryMappedFile(void);