Skip to content

Commit

Permalink
[Rcpp] cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
JanMarvin committed Jan 11, 2025
1 parent 828b6cd commit d80bcdb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/helper_functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ Rcpp::IntegerVector col_to_int(Rcpp::CharacterVector x) {
Rcpp::CharacterVector ox_int_to_col(Rcpp::NumericVector x) {
R_xlen_t n = static_cast<R_xlen_t>(x.size());
Rcpp::CharacterVector colNames(n);
std::unordered_map<int, std::string> cache;
std::unordered_map<uint32_t, std::string> cache; // Updated key type

for (R_xlen_t i = 0; i < n; ++i) {
uint32_t num = static_cast<uint32_t>(x[i]);
Expand Down
3 changes: 2 additions & 1 deletion src/xlsb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1074,7 +1074,8 @@ int32_t comments_bin(std::string filePath, std::string outPath, bool debug) {

case BrtBeginComment:
{
uint32_t iauthor = 0, guid0 = 0, guid1 = 0, guid2 = 0, guid3 = 0;
uint32_t iauthor = 0;
int32_t guid0 = 0, guid1 = 0, guid2 = 0, guid3 = 0;
iauthor = readbin(iauthor, bin, swapit);
std::vector<int32_t> rfx = UncheckedRfX(bin, swapit);

Expand Down
2 changes: 1 addition & 1 deletion src/xlsb_funs.h
Original file line number Diff line number Diff line change
Expand Up @@ -1046,7 +1046,7 @@ std::string typOperator(uint8_t oprtr) {
}


std::string grbitSgnOperator(uint8_t oprtr) {
std::string grbitSgnOperator(int8_t oprtr) {

if (oprtr == 0x01) return "lessThan";
if (oprtr == 0x02) return "equal";
Expand Down

0 comments on commit d80bcdb

Please sign in to comment.