在XX公司工作第二天,维护已有代码
2017-07-18 20:35
627 查看
根据《C++ More Exception》所述的规则:
Rule #1: Never write using-directives in header files.
Rule #2: Never write namespace using-declarations in header files.
Rule #3: In implementation files, never use a using-declaration or a using-directive before #include directive.
Rule #4: Use C headers with the new style #include <cheader> instead of the old style #include <header.h>.
1.今天我把我负责的代码全部头文件里的using命令和声明全部移动到实现文件里,并在实现文件里将using放置在全部头文件的后面。
2.去除了关于std空间的前向声明
3.给变量起了一个更好的名字
备注一下:前向声明其它命名空间形式例如以下
namespace android{
class TouchInputMapper; (类)
template <typename T> class Singleton;(模版)
}
Rule #1: Never write using-directives in header files.
Rule #2: Never write namespace using-declarations in header files.
Rule #3: In implementation files, never use a using-declaration or a using-directive before #include directive.
Rule #4: Use C headers with the new style #include <cheader> instead of the old style #include <header.h>.
1.今天我把我负责的代码全部头文件里的using命令和声明全部移动到实现文件里,并在实现文件里将using放置在全部头文件的后面。
2.去除了关于std空间的前向声明
3.给变量起了一个更好的名字
备注一下:前向声明其它命名空间形式例如以下
namespace android{
class TouchInputMapper; (类)
template <typename T> class Singleton;(模版)
}
相关文章推荐
- 在XX公司工作第二天,维护已有代码
- Xcode概览:在项目或工作区中维护代码和其他资源
- 登录第二天,这就是工作,一切趋于稳定,思维的火花慢慢迸发了,啃代码比想象中的好些~
- X5开发团队看板 维护工作 根据计划生成工作 部分代码
- 代码维护时的前期准备工作
- 实习第二天——学习mac终端命令(unix命令)和git代码管理
- 维护前辈代码,痛并快乐着...
- 我也来咆哮一次!维护了一坨屎一样的代码
- 通向可维护代码的三种态度
- UI 界面的编写工作,到底应该用 xib/storyboard 完成,还是用手写代码来完成?
- 服务器是如何执行php代码的,nginx和php是怎么协调工作的?
- 网管员在局域网维护工作中的注意事项
- 工作中的代码统计
- excel 同一工作表中非连续区域中筛选唯一值 (VBA代码) 二
- 修改代码的艺术--YH维护修改“全部退餐”有感
- 黑马程序员-多线程-在android开发中经常会遇到从子线程切换到主线程,但是频繁地切换会使代码变得很臃肿,也不好维护,想请教一下各位大牛都是怎么处理的?
- ggplot2画图工作中的代码总结
- 在xcode7中使用纯代码编写工程准备工作
- 带病工作第二天
- SAP系统管理员应做的工作(附操作事务代码)