asar coverage - build #274


src/asar/
File: src/asar/std-includes.h
Date: 2025-03-04 15:06:12
Lines:
4/4
100.0%
Functions:
1/1
100.0%
Branches:
3/6
50.0%

Line Branch Exec Source
1 #pragma once
2
3 // RPG Hacker: Some standard headers unfortunately like to
4 // spew loads of warnings on some platforms, and since this
5 // is kinda annoying, let's wrap the headers in here so
6 // that we can easily disable certain warnings via pragmas.
7
8 #if defined(_MSC_VER)
9 # pragma warning(push)
10 # pragma warning(disable : 4514)
11 # pragma warning(disable : 4577)
12 # pragma warning(disable : 4668)
13 # pragma warning(disable : 4987)
14 #endif
15
16 #include <new>//placement new
17 #include <stdlib.h>//malloc, realloc, free
18 #include <string.h>//strcmp, memmove
19 #include <stdio.h>
20 #include <ctype.h>
21 #include <math.h>
22 #include <cstdio>
23
24 21482 inline char * duplicate_string(const char * str)
25 {
26
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 9210 times.
21482 char * a = (char*)malloc(sizeof(char)*(strlen(str) + 1));
27
2/4
✗ Branch 0 not taken.
✓ Branch 1 taken 9210 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 9210 times.
21482 strcpy(a, str);
28 21482 return a;
29 }
30
31 #if defined(_MSC_VER)
32 # pragma warning(pop)
33 #endif
34