Skip to content

Commit 26bc3c9

Browse files
committed
Update astyle to version 3.0.1
1 parent d2f5d34 commit 26bc3c9

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ int main(int argc, char **argv)
8585
break;
8686
case simplecpp::Output::UNHANDLED_CHAR_ERROR:
8787
std::cerr << "unhandled char error: ";
88-
break;
88+
break;
8989
}
9090
std::cerr << output.msg << std::endl;
9191
}

runastyle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
# If project management wishes to take a newer astyle version into use
88
# just change this string to match the start of astyle version string.
9-
ASTYLE_VERSION="Artistic Style Version 2.05.1"
9+
ASTYLE_VERSION="Artistic Style Version 3.0.1"
1010
ASTYLE="astyle"
1111

1212
DETECTED_VERSION=`$ASTYLE --version 2>&1`
@@ -16,8 +16,8 @@ if [[ "$DETECTED_VERSION" != ${ASTYLE_VERSION}* ]]; then
1616
exit 1;
1717
fi
1818

19-
style="--style=stroustrup --indent=spaces=4 --indent-namespaces --lineend=linux --min-conditional-indent=0"
20-
options="--options=none --pad-header --unpad-paren --suffix=none --convert-tabs --attach-inlines"
19+
style="--style=kr --indent=spaces=4 --indent-namespaces --lineend=linux --min-conditional-indent=0"
20+
options="--options=none --pad-header --unpad-paren --suffix=none --convert-tabs --attach-inlines --attach-classes --attach-namespaces"
2121

2222
$ASTYLE $style $options *.cpp
2323
$ASTYLE $style $options *.h

simplecpp.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -715,8 +715,8 @@ void simplecpp::TokenList::constFoldUnaryNotPosNeg(simplecpp::Token *tok)
715715
tok->setstr(tok->next->str == "0" ? "1" : "0");
716716
deleteToken(tok->next);
717717
} else if (tok->op == '~' && tok->next && tok->next->number) {
718-
tok->setstr(toString(~stringToLL(tok->next->str)));
719-
deleteToken(tok->next);
718+
tok->setstr(toString(~stringToLL(tok->next->str)));
719+
deleteToken(tok->next);
720720
} else {
721721
if (tok->previous && (tok->previous->number || tok->previous->name))
722722
continue;
@@ -1747,7 +1747,7 @@ static bool realFileName(const std::string &f, std::string *result)
17471747

17481748
// Lookup filename or foldername on file system
17491749
WIN32_FIND_DATAA FindFileData;
1750-
HANDLE hFind = FindFirstFileExA(f.c_str(), FindExInfoBasic, &FindFileData, FindExSearchNameMatch, NULL, 0);
1750+
HANDLE hFind = FindFirstFileExA(f.c_str(), FindExInfoBasic, &FindFileData, FindExSearchNameMatch, NULL, 0);
17511751

17521752
if (INVALID_HANDLE_VALUE == hFind)
17531753
return false;
@@ -2022,9 +2022,9 @@ static std::string openHeader(std::ifstream &f, const simplecpp::DUI &dui, const
20222022

20232023
static std::string getFileName(const std::map<std::string, simplecpp::TokenList *> &filedata, const std::string &sourcefile, const std::string &header, const simplecpp::DUI &dui, bool systemheader)
20242024
{
2025-
if (filedata.empty()) {
2026-
return "";
2027-
}
2025+
if (filedata.empty()) {
2026+
return "";
2027+
}
20282028
if (isAbsolutePath(header)) {
20292029
return (filedata.find(header) != filedata.end()) ? simplecpp::simplifyPath(header) : "";
20302030
}

0 commit comments

Comments
 (0)