Fixed wrong line ending in generated CL code.

This commit is contained in:
XMRig 2019-11-15 01:27:30 +07:00
parent 5fa7a743f5
commit 79f4685d9a
5 changed files with 6733 additions and 7318 deletions

View file

@ -2,7 +2,8 @@
function opencl_minify(input)
{
let out = input.replace(/\/\*[\s\S]*?\*\/|\/\/.*$/gm, ''); // comments
let out = input.replace(/\r/g, '');
out = out.replace(/\/\*[\s\S]*?\*\/|\/\/.*$/gm, ''); // comments
out = out.replace(/^#\s+/gm, '#'); // macros with spaces
out = out.replace(/\n{2,}/g, '\n'); // empty lines
out = out.replace(/^\s+/gm, ''); // leading whitespace
@ -10,7 +11,7 @@ function opencl_minify(input)
let array = out.split('\n').map(line => {
if (line[0] === '#') {
return line
return line;
}
line = line.replace(/, /g, ',');