Skip to content

Commit 83f8f32

Browse files
author
Samat Gaynutdinov
committed
refactor: ss << tab;
1 parent e4354ea commit 83f8f32

File tree

3 files changed

+2
-11
lines changed

3 files changed

+2
-11
lines changed

server/src/printers/DefaultMakefilePrinter.cpp

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,9 @@ void DefaultMakefilePrinter::declareVariable(std::string const &name, std::strin
1717
ss << stringFormat("%s = %s\n", name, value);
1818
}
1919

20-
void DefaultMakefilePrinter::Tab() {
21-
int prevTabsDepth = tabsDepth;
22-
tabsDepth = 1;
23-
ss << TAB_N();
24-
tabsDepth = prevTabsDepth;
25-
}
26-
2720
void DefaultMakefilePrinter::declareVariableIfNotDefined(std::string const &variableName, std::string const &ifNotDefinedValue) {
2821
ss << stringFormat("ifndef %s\n", variableName);
29-
Tab();
22+
ss << TAB;
3023
declareVariable(variableName, ifNotDefinedValue);
3124
ss << "endif\n";
3225
}

server/src/printers/DefaultMakefilePrinter.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ class DefaultMakefilePrinter : public Printer {
2121

2222
void declareVariableIfNotDefined(std::string const &variableName, std::string const &ifNotDefinedValue);
2323

24-
void Tab();
25-
2624
template<class ContainerD = std::initializer_list<std::string>,
2725
class ContainerA = std::initializer_list<std::string>>
2826
void declareTarget(std::string const &name,

server/src/printers/NativeMakefilePrinter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -726,7 +726,7 @@ namespace printer {
726726
void NativeMakefilePrinter::declareVariableWithPriority(std::string const &variableName,
727727
std::string const &variablePath) {
728728
ss << stringFormat("ifneq (\"$(wildcard %s)\",\"\")\n", variablePath);
729-
Tab();
729+
ss << TAB;
730730
declareVariable(variableName, variablePath);
731731
ss << "endif\n";
732732
}

0 commit comments

Comments
 (0)