Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/oatpp-postgresql/Executor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ namespace {

class VersionRow : public oatpp::DTO {

DTO_INIT(VersionRow, DTO);
DTO_INIT(VersionRow, DTO)

DTO_FIELD(Int64, version);

Expand Down Expand Up @@ -90,7 +90,7 @@ Executor::QueryParams::QueryParams(const StringTemplate& queryTemplate,
paramLengths.resize(count);
paramFormats.resize(count);

for(v_uint32 i = 0; i < count; i ++) {
for(v_int32 i = 0; i < count; i ++) {

const auto& var = queryTemplate.getTemplateVariables()[i];
auto it = params.find(var.name);
Expand Down
5 changes: 3 additions & 2 deletions src/oatpp-postgresql/mapping/Deserializer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,8 @@ oatpp::Void Deserializer::deserializeSubArray(const Type* type,
auto itemType = dispatcher->getItemType();
auto collection = dispatcher->createObject();

if(dimension < meta.dimensions.size() - 1) {
const v_int32 metaDimensions = meta.dimensions.size() - 1;
if(dimension < metaDimensions) {

auto size = meta.dimensions[dimension];

Expand All @@ -358,7 +359,7 @@ oatpp::Void Deserializer::deserializeSubArray(const Type* type,

return collection;

} else if(dimension == meta.dimensions.size() - 1) {
} else if(dimension == metaDimensions) {

auto size = meta.dimensions[dimension];

Expand Down
2 changes: 1 addition & 1 deletion src/oatpp-postgresql/mapping/Deserializer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ class Deserializer {
template<typename T>
static const oatpp::Type* generateMultidimensionalArrayType(const InData& data) {

if(data.size < sizeof(v_int32)) {
if(data.size < static_cast<v_buff_size>(sizeof(v_int32))) {
return nullptr;
}

Expand Down
2 changes: 1 addition & 1 deletion src/oatpp-postgresql/mapping/PgArray.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ void ArrayUtils::readArrayHeader(data::stream::InputStream* stream,

dimensions.push_back(arrayHeader.size);

for(v_uint32 i = 1; i < arrayHeader.ndim; i++) {
for(v_int32 i = 1; i < arrayHeader.ndim; i++) {
stream->readExactSizeDataSimple(&v, sizeof(v_int32));
dimensions.push_back(ntohl(v));

Expand Down
4 changes: 2 additions & 2 deletions src/oatpp-postgresql/mapping/type/Uuid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ UuidObject::UuidObject(const oatpp::String& text) {
std::memcpy(m_data, stream.getData(), DATA_SIZE);
}

const p_char8 UuidObject::getData() const {
return (const p_char8) m_data;
const v_char8* UuidObject::getData() const {
return static_cast<const v_char8*>(m_data);
}

v_buff_size UuidObject::getSize() const {
Expand Down
2 changes: 1 addition & 1 deletion src/oatpp-postgresql/mapping/type/Uuid.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class UuidObject {
* Get raw data of ObjectId.
* @return
*/
const p_char8 getData() const;
const v_char8* getData() const;

/**
* Get size of ObjectId data.
Expand Down