通过使用常量字符串,可以避免分配内存、复制字符串和编码转换过程。
By using a constant string, you avoid allocating memory, copying the string, and the transcoding process.
当然,如果您不需要更多的灵活性,那么可以在函数主体中直接使用常量,而不是参数。
Of course, you could use constants directly in the function body instead of parameters if you don't need the additional flexibility.
您需要使用常量来表示基本 SimpleDB 操作的照片模式和评论模式,因此在此处定义它们。
You'll need constants to represent the image mode versus the comment mode for the basic SimpleDB operations, so define them here.
应用推荐