braydenanderson2014 / C-Arduino-Libraries

This repository contains C++ and Arduino Libraries that are lightweight and easy to use. All libraries were created/mimicked by me and chatgpt.
Apache License 2.0
13 stars 0 forks source link

Conversion from 'int' to 'const String' is ambiguous [get()] #10

Closed braydenanderson2014 closed 11 months ago

braydenanderson2014 commented 11 months ago

Describe the Issue Conversion from 'int' to 'const String' is ambiguous

Library Name and Version: Name: Hashtable Version: 1.0.3

Environment:

Library Source:

Expected Behavior Build to be successful

Actual Behavior Build fails.

To Reproduce Steps to reproduce the behavior:

  1. Include library 'Hashtable.h'
  2. Initialize the library 'Hashtable <String, String> hash; '; 'Hashtable <int,int> intHash;'
  3. See error Conversion from 'int' to 'const String' is ambiguous Error Seems to be with the get() function.

Error Message & Code Snippet If applicable, add the error message and the piece of code that causes the issue.


#include <Arduino.h>
#include <Properties.h>
#include <SPI.h>
#include <Hashtable.h>

Properties prop;
Hashtable <String, String> hash;
Hashtable <int, int> intHash;

void setup(){
    Serial.begin(9600);
    prop.setProperty("test", "test");
    Serial.println(prop.getProperty("test"));

    hash.put("test", "test2");
    Serial.println("hash.get("test"));

    intHash.put(1,2);
    Serial.println(intHash.get(1));
}

Additional Context
Library was untested until now.
<!-- End of the issue report template. -->
braydenanderson2014 commented 11 months ago

Issue was fixed with the latest Release.