在C ++代码中按字母顺序自动排序函数 [英] Automatically sort functions alphabetically in C++ code

查看:231
本文介绍了在C ++代码中按字母顺序自动排序函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道有一个 C#。我下载并尝试了NArrange和UniversalIndentGUI,但是两者都不对每个名称的C ++代码排序功能。有没有人知道一个非商业性的工具,做这项工作?

I am aware of a similar question for C#. I downloaded and tried NArrange and UniversalIndentGUI but both do not sort functions of C++ code per name. Does anyone know a non-commercial tool that does this job?

推荐答案

除非你是重新安排代码,到任意编码标准,我的建议是不要这样做。我看过人们以前做的,结果不漂亮。完成后,文件将看起来完全不同,您将有效地删除源代码控制中的所有编辑历史记录。任何在这个版本和任何版本之间的差异之前,它会看起来像一个混乱的混乱。从长远看,拥有清晰的差异历史记录对您和您的团队来说比一些代码清洁度更有价值。

Unless you're under orders to rearrange the code to conform to an arbitrary coding standard, my advice is do not do this. I've seen people do it before, and the results are not pretty. The file will look completely different after you're done, and you'll have effectively trashed all of the edit history in source control. Any diffs between this version and any version that came before it will look like a jumbled mess. In the long run, having a clear diff history is worth more to you and your team than some measure of code cleanliness.

这篇关于在C ++代码中按字母顺序自动排序函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆