diff --git a/include/bx/string.h b/include/bx/string.h index 6ce98bc..3fdce89 100644 --- a/include/bx/string.h +++ b/include/bx/string.h @@ -21,6 +21,7 @@ namespace bx }; /// Non-zero-terminated string view. + /// class StringView { public: @@ -77,9 +78,16 @@ namespace bx /// void clear(); + /// Returns pointer to non-terminated string. + /// + /// @attention Use of this pointer in standard C/C++ functions is not safe. You must use it + /// in conjunction with `getTerm()` or getLength()`. /// const char* getPtr() const; + /// Returns pointer past last character in string view. + /// + /// @attention Dereferencing this pointer is not safe. /// const char* getTerm() const; diff --git a/src/file.cpp b/src/file.cpp index c809d71..6ffab48 100644 --- a/src/file.cpp +++ b/src/file.cpp @@ -20,12 +20,12 @@ # if BX_CONFIG_CRT_DIRECTORY_READER # include # endif // BX_CONFIG_CRT_DIRECTORY_READER -# include // remove +# include // remove +# include // stat, mkdir # if BX_CRT_MSVC -# include // _getcwd +# include // _getcwd # else -# include // stat, mkdir -# include // getcwd +# include // getcwd # endif // BX_CRT_MSVC #endif // !BX_CRT_NONE