C++ 缩进将额外的常量添加到常量方法中
这是我的C++ 缩进将额外的常量添加到常量方法中,c++,indentation,C++,Indentation,这是我的makefile: TRASH = *.o complex *~ complex: test.o complex.o g++ -Wall -o $@ $^ test.o: test.cpp complex.hpp g++ -Wall -c -o $@ $< complex.o: complex.cpp complex.hpp g++ -Wall -c -o $@ $< PHONY: clean beauty clean
makefile
:
TRASH = *.o complex *~
complex: test.o complex.o
g++ -Wall -o $@ $^
test.o: test.cpp complex.hpp
g++ -Wall -c -o $@ $<
complex.o: complex.cpp complex.hpp
g++ -Wall -c -o $@ $<
PHONY: clean beauty
clean:
rm -f $(TRASH)
beauty:
indent -npsl -brf -cdb test.cpp complex.cpp complex.hpp
问题:
如果我有一些C++函数,它有原型:<代码>复方法名(参数)const;
每当我在.cpp
文件上使用make beauty
时,出于某种原因,它会再添加一个常量
,我的函数如下:
int function () {
/*
Comments
*/
}
Complex method_name(arguments) const const {
/*
Comments
*/
}
注意:头文件缩进得很好,但是.cpp
文件的缩进方式与我前面描述的一样
有人知道这是什么原因吗?是的,我已经收到确认,这是当前缩进版本中的正式错误 是的,我已经收到确认,这是当前缩进版本中的正式错误 问题与make
无关,而是与indent
程序有关。它看起来像是缩进中的一个bug。。不过,在邮件列表线程中,它似乎没有得到明确的解决:|谢谢你们,我一整天都在为这件事发疯!问题与make
无关,而是与indent
程序有关。它看起来像是缩进中的一个bug。。不过,在邮件列表线程中,它似乎没有得到明确的解决:|谢谢你们,我一整天都在为这件事发疯!