Skip to content

Commit

Permalink
add missing runtime_error include and improperly located headers
Browse files Browse the repository at this point in the history
  • Loading branch information
tfussell committed Nov 3, 2015
1 parent 2c8ccdf commit a2919df
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
File renamed without changes.
3 changes: 2 additions & 1 deletion source/packaging/manifest.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include <algorithm>
#include <stdexcept>

#include <xlnt/workbook/manifest.hpp>
#include <xlnt/packaging/manifest.hpp>

namespace {

Expand Down
9 changes: 6 additions & 3 deletions tests/helpers/temporary_file.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,29 @@
#include <string>

#include <detail/include_windows.hpp>

#include "path_helper.hpp"
#include <helpers/path_helper.hpp>

class TemporaryFile
{
public:
static std::string CreateTemporaryFilename()
{
#ifdef _WIN32
#ifdef _MSC_VER
std::array<TCHAR, MAX_PATH> buffer;
DWORD result = GetTempPath(static_cast<DWORD>(buffer.size()), buffer.data());

if(result > MAX_PATH)
{
throw std::runtime_error("buffer is too small");
}

if(result == 0)
{
throw std::runtime_error("GetTempPath failed");
}

std::string directory(buffer.begin(), buffer.begin() + result);

return PathHelper::WindowsToUniversalPath(directory + "xlnt.xlsx");
#else
return "/tmp/xlnt.xlsx";
Expand Down

0 comments on commit a2919df

Please sign in to comment.