I've encountered a problem today with the latest version (3.4.8) on Windows. The output for C-style casts in a function call in C/C++ code alternates constantly between two consecutive runs. The problem can be reproduced with this small snippet:
#pragma once
void testMethod()
{
if (anotherMethod((uint8_t*)param1, (uint8_t*)param2)) {
return;
}
}
If I run astyle for this code a space will be added to the casts between the type and the asterisk:
#pragma once
void testMethod()
{
if (anotherMethod((uint8_t *)param1, (uint8_t *)param2)) {
return;
}
}
If I rerun it the space will be removed, and so on. I've attached the options file.
Background: we've been using Astyle 3.1 for 3 years now on Linux. Now we are porting our development to Windows, for which I downloaded the latest version, that generates this frustrating issue. This makes it unusable for us, as files are constantly shown as changed in git.
As a quick fix I've downloaded version 3.1 for Windows, and I could not reproduce the bug with it.
Thanks for reporting, the issue is fixed in the git repo. New release will be published soon.
Fixed in 3.4.9.