⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 resizeablestringformatter.cpp

📁 跨操作系统的微型中间件
💻 CPP
字号:
/*    File:       ResizeableStringFormatter.cpp    Contains:   Implements object defined in ResizeableStringFormatter.h        */#include "ResizeableStringFormatter.h"void    ResizeableStringFormatter::BufferIsFull(char* inBuffer, UInt32 inBufferLen){    //allocate a buffer twice as big as the old one, and copy over the contents    UInt32 theNewBufferSize = this->GetTotalBufferSize() * 2;    if (theNewBufferSize == 0)        theNewBufferSize = 64;            char* theNewBuffer = new char[theNewBufferSize];    ::memcpy(theNewBuffer, inBuffer, inBufferLen);    //if the old buffer was dynamically allocated also, we'd better delete it.    if (inBuffer != fOriginalBuffer)        delete [] inBuffer;        fStartPut = theNewBuffer;    fCurrentPut = theNewBuffer + inBufferLen;    fEndPut = theNewBuffer + theNewBufferSize;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -