small formatting issues and helper api

This commit is contained in:
Daniel Larimer 2016-10-18 11:53:26 -04:00
parent 6bd5a6c73b
commit 815f07506c
3 changed files with 9 additions and 7 deletions

View file

@ -25,10 +25,12 @@ namespace fc {
const T& operator[]( size_t pos )const { assert( pos < N); return data[pos]; }
T* begin() { return &data[0]; }
const T* begin()const { return &data[0]; }
const T* end()const { return &data[N]; }
T* begin() { return &data[0]; }
T* end() { return &data[N]; }
size_t size()const { return N; }
T data[N];

View file

@ -31,7 +31,7 @@ namespace fc {
path();
~path();
path( const boost::filesystem::path& );
path( const fc::string& p );
path( const std::string& p );
/// Constructor to build path using unicode native characters.
path(const std::wstring& p);
path( const char* );
@ -54,12 +54,12 @@ namespace fc {
fc::path extension()const;
fc::path filename()const;
fc::path parent_path()const;
fc::string string()const;
fc::string generic_string()const;
std::string string()const;
std::string generic_string()const;
/** On windows, returns a path where all path separators are '\' suitable for displaying
* to users. On other platforms, it does the same as generic_string()
*/
fc::string preferred_string() const;
std::string preferred_string() const;
std::wstring wstring() const;
std::wstring generic_wstring() const;
@ -77,7 +77,7 @@ namespace fc {
*
* @note not part of boost::filesystem::path
*/
fc::string windows_string()const;
std::string windows_string()const;
bool is_relative()const;
bool is_absolute()const;

View file

@ -61,7 +61,7 @@ namespace fc {
*
* @code
* void write_message() {
* boost::unique_lock<cmt::mutex> lock(sock->write_lock);
* boost::unique_lock<fc::mutex> lock(sock->write_lock);
* sock->write(part1); // may yield
* sock->write(part2); // may yield
* sock->write(part3); // may yield