Commit 39b7da9aad67fc816a3e3a6a001087bfc68d748a
1 parent
62ed4ef4
Exists in
master
and in
1 other branch
Fixing windows build.
Showing
1 changed file
with
2 additions
and
8 deletions
Show diff stats
src/core/hllapi.cc
... | ... | @@ -472,15 +472,10 @@ HLLAPI_API_CALL hllapi_set_session_parameter(LPSTR param, WORD len, WORD value) |
472 | 472 | |
473 | 473 | int rc = HLLAPI_STATUS_BAD_PARAMETER; |
474 | 474 | |
475 | - char * buffer = NULL; | |
476 | - asprintf(&buffer,"%u",(unsigned int) value); | |
477 | - | |
478 | - if(!buffer) | |
479 | - return HLLAPI_STATUS_SYSTEM_ERROR; | |
480 | - | |
481 | 475 | try { |
482 | 476 | |
483 | - getSession().setProperty(param,buffer); | |
477 | + string buffer = std::to_string((unsigned int) value); | |
478 | + getSession().setProperty(param,buffer.c_str()); | |
484 | 479 | |
485 | 480 | } catch(const std::system_error &e) { |
486 | 481 | |
... | ... | @@ -500,7 +495,6 @@ HLLAPI_API_CALL hllapi_set_session_parameter(LPSTR param, WORD len, WORD value) |
500 | 495 | |
501 | 496 | } |
502 | 497 | |
503 | - free(buffer); | |
504 | 498 | return rc; |
505 | 499 | |
506 | 500 | } | ... | ... |