Qt宏之Q_UNUSED
来源:互联网 发布:写文档的软件 编辑:程序博客网 时间:2024/04/28 06:28
原帖在这里:http://blog.csdn.net/locky1218/article/details/10161873
Q_UNUSED() 没有实质性的作用,用来避免编译器警告
//比如说
02
03
int
testFunc(
int
a,
int
b,
int
c,
int
d)
04
{
05
int
e;
06
return
a+b+c;
07
}
08
09
//编译器会有警告 d和e未使用;
10
11
//于是
12
int
testFunc(
int
a,
int
b,
int
c,
int
d)
13
{
14
int
e;
15
16
Q_UNUSED(d)
17
Q_UNUSED(e)
18
return
a+b+c;
19
}
20
21
//多数时候,这样用总不是太好
22
23
//比如 e,就不该出现,
24
25
//对于d,也可以 注释掉
26
27
int
testFunc(
int
a,
int
b,
int
c,
int
/* d */
)
28
{
29
//int e;
30
return
a+b+c;
31
}
- Qt宏之Q_UNUSED
- Qt小知识1-Q_UNUSED
- Q_UNUSED()应用
- Q_UNUSED() 方法的使用
- Qt之RC_FILE宏
- Qt之Q_OBJECT 宏定义
- Qt之Q_PROPERTY宏定义
- Qt之Q_PROPERTY宏定义二
- qt学习之qt creator
- qt学习之qt安装
- Qt基础之hello qt
- Qt之Qt::WA_DeleteOnClose详解
- Qt|Qt之鼠标样式
- Qt 之 Qt Charts 模块
- qt学习之qtableview
- 开始Qt之旅
- Qt之对话框
- QT之正则表达式
- redis数据库
- linux中Daemon守护进程编程
- 解决转换flash的SWF到视频文件没有声音的问题
- 专业程序员必知必会技巧:驯服复杂代码
- 什么时候加上android.intent.category.DEFAULT
- Qt宏之Q_UNUSED
- mac下cocos2d-x配置android环境
- lightoj 1210 最少加边,使得图变成强联通
- oc一些基本语法1
- Linux中系统服务/守护进程 (daemon) 的详细说明
- [Unity for android]Unity在安卓机上调试的测试环境搭建
- css+div 小三角tip小提示
- 对话框中有EditText如何一弹就出现软键盘
- Buy Tickets