From f3cd3f7c51a87fa69b5055fa2ea5a4832256d8ab Mon Sep 17 00:00:00 2001 From: Peter Vingelmann Date: Sat, 10 Sep 2016 04:55:59 +0200 Subject: [PATCH] Allow max-instatement-indent to be less than 40 --- src/astyle_main.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/astyle_main.cpp b/src/astyle_main.cpp index 16a0c4b..567370c 100644 --- a/src/astyle_main.cpp +++ b/src/astyle_main.cpp @@ -2796,7 +2796,7 @@ void ASOptions::parseOption(const string& arg, const string& errorInfo) string maxIndentParam = getParam(arg, "M", "max-instatement-indent="); if (maxIndentParam.length() > 0) maxIndent = atoi(maxIndentParam.c_str()); - if (maxIndent < 40) + if (maxIndent < 2 * formatter.getIndentLength()) isOptionError(arg, errorInfo); else if (maxIndent > 120) isOptionError(arg, errorInfo); @@ -3552,7 +3552,6 @@ size_t Utf8_16::utf16ToUtf8(char* utf16In, size_t inLen, bool isBigEndian, } //---------------------------------------------------------------------------- - } // end of astyle namespace //----------------------------------------------------------------------------