Skip to content

Commit

Permalink
Release 2.7.11 (#245)
Browse files Browse the repository at this point in the history
* Release 2.7.11

* remove use of enum class
  • Loading branch information
eendebakpt authored Oct 5, 2023
1 parent 9a81ccb commit bf37220
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 30 deletions.
6 changes: 3 additions & 3 deletions src/extend.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class OAextend {
int init_column_previous;

/// Specification of how to use the generated extensions
enum class extendarray_mode_t {
enum extendarray_mode_t {
/// append extension column to extension list
APPENDEXTENSION,
/// append full array to extension list
Expand Down Expand Up @@ -215,15 +215,15 @@ int extend_array (const array_link &array, const arraydata_t *arrayclass, const
arraylist_t runExtendRoot (arraydata_t arrayclass, int max_number_columns, int verbose = 0);


enum class dfilter_t {
enum dfilter_t {
/// no filtering on D-efficiency
DFILTER_NONE,
/// filtering on D-efficiency
DFILTER_BASIC,
/// filtering on D-efficiency with multi column prediction
DFILTER_MULTI };

enum class dcalc_mode {
enum dcalc_mode {
/// always calculate efficiency
DCALC_ALWAYS,
/// only calculate efficiency for LMC_LESS
Expand Down
2 changes: 1 addition & 1 deletion src/mathtools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ std::string printfstring(const char* message, ...) {

va_list va;
va_start(va, message);
vsprintf(buf, message, va);
vsnprintf(buf, 64*1024, message, va);
va_end(va);

std::string str(buf);
Expand Down
31 changes: 6 additions & 25 deletions src/tools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ void printfd_handler (const char *file, const char *func, int line, const char *

const char *fileshort = s.c_str ();
myprintf ("file %s: function %s: line %d: ", fileshort, func, line);
char buf[64 * 1024];
char buf[32 * 1024];

va_list va;
va_start (va, message);
vsprintf (buf, message, va);
vsnprintf (buf, 32*1024, message, va);
va_end (va);
myprintf ("%s", buf);
}
Expand Down Expand Up @@ -171,7 +171,7 @@ void warning(const char* message, ...) {

va_list va;
va_start(va, message);
vsprintf(buf, message, va);
vsnprintf(buf, 12 * 1024, message, va);
va_end(va);

#ifdef SWIGCODE
Expand All @@ -182,25 +182,6 @@ void warning(const char* message, ...) {
#endif
}

#define XPFS
#ifndef XPFS
/**
* @brief Function similar to printf returning C++ style string
* @param message
* @return
*/
std::string printfstring (const char *message, ...) {
char buf[12 * 1024];

va_list va;
va_start (va, message);
vsprintf (buf, message, va);
va_end (va);

std::string str (buf);
return str;
}
#endif

/*!Returns the actual time with millisecond precission, can be used for measuring times of small functions
\brief Returns the actual time with millisecond precission
Expand Down Expand Up @@ -329,14 +310,14 @@ int log_print (const int level, const char *message, ...) {
static int _loglevel = (int)QUIET;
#endif

char buf[64 * 1024];
char buf[8 * 1024];

if (level < 0) { // level < 0 means set level, any message appended is printed as well
#pragma omp critical(logprint)
{
va_list va;
va_start(va, message);
vsprintf(buf, message, va);
vsnprintf(buf, 64 * 1024, message, va);
va_end(va);
int mlevel = -level;
_loglevel = mlevel;
Expand All @@ -348,7 +329,7 @@ int log_print (const int level, const char *message, ...) {
{
va_list va;
va_start(va, message);
vsprintf(buf, message, va);
vsnprintf(buf, 64 * 1024, message, va);
va_end(va);
myprintf ("%s", buf);
}
Expand Down
2 changes: 1 addition & 1 deletion src/version.h
Original file line number Diff line number Diff line change
@@ -1 +1 @@
const char *__version__ = "2.7.10";
const char *__version__ = "2.7.11";

0 comments on commit bf37220

Please sign in to comment.