Skip to content

Commit

Permalink
Fix merge conflict with Amit 2
Browse files Browse the repository at this point in the history
  • Loading branch information
nav-mohan committed Feb 2, 2025
1 parent 2e1a87e commit ef8c6f5
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 26 deletions.
8 changes: 0 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -160,14 +160,6 @@ if(NOT WIN32 OR CYGWIN)
endif()


# Keeping the name XXD for now, as otherwise this will result in much larger refactoring
# But everywhere, XXD = base64-encode
set(XXD_EXECUTABLE ${PROJECT_BINARY_DIR}/utils/base64-encode)
add_subdirectory(cpp/src/base64-encode)
add_dependencies(kim-api base64-encode)
install(TARGETS base64-encode
RUNTIME DESTINATION ${CMAKE_INSTALL_RELOC_BINDIR})

# Add install rules for kim-api
#
install(TARGETS kim-api
Expand Down
18 changes: 0 additions & 18 deletions cpp/src/KIM_SharedLibrary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -647,14 +647,6 @@ int SharedLibrary::WriteParameterFileDirectory()
fl.open(specificationFilePathName.string().c_str(),
std::ifstream::out | std::ifstream::binary);

std::vector<char> binary_line;
binary_line.reserve(base64::decoded_size(len));
std::pair<std::size_t, std::size_t> char_out_and_char_in
= base64::decode(binary_line.data(), specificationData, len);

fl.write(reinterpret_cast<char *>(binary_line.data()),
static_cast<std::streamsize>(char_out_and_char_in.first));

if (!fl)
{
LOG_ERROR("Unable to get write parameter file.");
Expand Down Expand Up @@ -687,16 +679,6 @@ int SharedLibrary::WriteParameterFileDirectory()
fl.open(parameterFilePathName.string().c_str(),
std::ifstream::out | std::ifstream::binary);

int usable_chars = static_cast<int>(
length); // unsigned int to signed to avoid underflow

std::vector<char> binary_line;
binary_line.reserve(base64::decoded_size(length));
std::pair<std::size_t, std::size_t> char_out_and_char_in
= base64::decode(binary_line.data(), strPtr, usable_chars);

fl.write(reinterpret_cast<char *>(binary_line.data()),
static_cast<std::streamsize>(char_out_and_char_in.first));
if (!fl)
{
LOG_ERROR("Unable to get write parameter file.");
Expand Down

0 comments on commit ef8c6f5

Please sign in to comment.