asar coverage - build #225


src/asar/
File: src/asar/std-includes.h
Date: 2024-03-11 13:00:09
Lines:
4/4
100.0%
Functions:
1/1
100.0%
Branches:
0/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 108804 inline char * duplicate_string(const char * str)
25 {
26 108804 char * a = (char*)malloc(sizeof(char)*(strlen(str) + 1));
27 108804 strcpy(a, str);
28 108804 return a;
29 }
30
31 #if defined(_MSC_VER)
32 # pragma warning(pop)
33 #endif
34