From 13e6a3fa82b6d159ae9c58db1360438543bd8734 Mon Sep 17 00:00:00 2001 From: guy Date: Fri, 25 Jan 2013 08:40:43 +0000 Subject: [PATCH] Aggiunto supporto per flushing cache articoli git-svn-id: svn://10.65.10.50/branches/R_10_00@22785 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- mg/mglib.h | 8 ++++---- mg/mglib02.cpp | 8 ++++++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/mg/mglib.h b/mg/mglib.h index 067549a8b..ed104230b 100755 --- a/mg/mglib.h +++ b/mg/mglib.h @@ -289,8 +289,8 @@ public: TArticolo_giacenza_loadable(const TRectype& rec); }; -TArticolo & cached_article(const char * codart); -TArticolo_giacenza & cached_article_balances(const char * codart); +TArticolo& cached_article(const char* codart); +TArticolo_giacenza& cached_article_balances(const char* codart); // ******************************* // LIBRERIA DI utility del magazzino @@ -301,11 +301,11 @@ class TR_automa; class TMetachar : public TObject { - TR_automa * _au; + TR_automa* _au; TString _language; protected: - void set_language(const char * language); // setta l'automa che ricosce il linguaggio passato + void set_language(const char* language); // setta l'automa che ricosce il linguaggio passato void add_tran(int statenum,unsigned char symbol,int next);// aggiunge le transizioni all'automa public: diff --git a/mg/mglib02.cpp b/mg/mglib02.cpp index 2ed6f47b2..c4ba12a7b 100755 --- a/mg/mglib02.cpp +++ b/mg/mglib02.cpp @@ -412,10 +412,14 @@ TCache_articoli::TCache_articoli() set_items_limit(257); // Numero primo! } -TArticolo & cached_article(const char * codart) +TArticolo& cached_article(const char* codart) { HIDDEN TCache_articoli __cache_articoli; - + if (codart == NULL) + { + __cache_articoli.destroy(); + codart = ""; + } return __cache_articoli.art(codart); }