Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

第一次作业 #117

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

knowledgaction
Copy link

stbi为什么使用了 STB_IMAGE_WRITE_IMPLEMENTATION 和'INCLUDE_STB_IMAGE_WRITE_H'这两个宏进行条件编译?我个人理解,这是一种“解耦”的设计,提高编译速度、减少可执行文件大小----试想一下,如果不通过宏控制函数定义,每个#include <stb_image_write.h>都要编译一遍(虽然函数是static的,可重复定义),每个都要编译一遍,会增加编译时间,同时增加可执行文件的体积。这个有些像是PIMPL的思想。

其他的,就是根据小彭老师课程内容,完成的常规的操作。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant