Skip to content

Commit

Permalink
Ease C++ reqs (4)
Browse files Browse the repository at this point in the history
  • Loading branch information
maxirmx committed Mar 18, 2023
1 parent c7bfd03 commit c4f7ace
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 27 deletions.
17 changes: 0 additions & 17 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -102,23 +102,6 @@ if(NOT MSVC)

endif(NOT MSVC)


CHECK_CXX_SOURCE_COMPILES(
"#include <memory>
int main(int argc, char**argv) {
return 0;
}
std::shared_ptr<int> test(void) {
std::shared_ptr<int> p(new int);
return p;
}"
CAN_RETURN_UNIQUE_PTR
)

if(CAN_RETURN_UNIQUE_PTR)
add_compile_definitions(RETURN_UNIQUE_PTR)
endif(CAN_RETURN_UNIQUE_PTR)

add_library(sexp STATIC
"src/sexp-input.cpp"
"src/sexp-output.cpp"
Expand Down
9 changes: 0 additions & 9 deletions include/sexp/sexp.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,6 @@
#include "sexp-error.h"

namespace sexp {

#ifdef RETURN_UNIQUE_PTR
#define _return_unique_ptr_(p) return p
#else
#define _return_unique_ptr_(p) return p
#endif

// (std::move(p))

/*
* SEXP octet_t definitions
* We maintain some presumable redundancy with ctype
Expand Down
2 changes: 1 addition & 1 deletion src/sexp-input.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ std::shared_ptr<sexp_object_t> sexp_input_stream_t::scan_to_eof(void)
get_char();
}
s->set_string(ss);
return p;
return s;
}

/*
Expand Down

0 comments on commit c4f7ace

Please sign in to comment.